Skip to content

Commit

Permalink
Update default scenario OSes
Browse files Browse the repository at this point in the history
CentOS 7 is outdated and sometimes fail due to flakey mirrors.
Need to update the OS list to something more recent.
  • Loading branch information
evrardjp committed Jul 14, 2022
1 parent bc37a0f commit be37c73
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 47 deletions.
1 change: 0 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ galaxy_info:
platforms:
- name: "EL"
versions:
- "7"
- "8"
- name: "Ubuntu"
versions:
Expand Down
25 changes: 10 additions & 15 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,18 @@
- "1"
- "100%"
tasks:
- name: Apt update and install rsync, ping, iproute
- name: Install basic packages
ansible.builtin.package:
update_cache: yes
name:
- rsync
- inetutils-ping
- iproute2
update_cache: "{{ ansible_os_family == 'Debian' | ternary('yes', omit) }}"
name: "{{ packagelist[ansible_os_family] | default([]) }}"
state: present
when: ansible_os_family == "Debian"

- name: Yum install iproute to fix undefined ansible_default_ipv4.address
ansible.builtin.package:
name: iproute
state: present
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == "7"
vars:
packagelist:
Debian:
- iproute2
RedHat:
- iproute
- iputils

- name: Add a container to a network, leaving existing containers connected
delegate_to: localhost
Expand Down
33 changes: 9 additions & 24 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,25 @@ provisioner:
v: True
log: True
platforms:
- name: keepalived-centos7
## Do not use pre_build_image, instead build it from the Dockerfile.j2
#pre_build_image: yes
#image: centos:7
## The Dockerfile.j2 will build image from https://github.com/ericsysmin/docker-ansible-images/
# Jeff geerling now has images, I trust those more than ericsysmin can use them.
- name: keepalived-rockylinux8
pre_build_image: yes
image: geerlingguy/docker-centos7-ansible
image: geerlingguy/docker-rockylinux8-ansible:latest
privileged: true
command: /sbin/init
tmpfs:
- /run
- /tmp
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro

- name: keepalived-centos8
- name: keepalived-bullseye
pre_build_image: yes
image: geerlingguy/docker-centos8-ansible:latest
image: geerlingguy/docker-debian11-ansible:latest
privileged: true
command: /sbin/init
tmpfs:
- /run
- /tmp
command: /lib/systemd/systemd
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro

# - name: keepalived-rockylinux8
# pre_build_image: yes
# image: geerlingguy/docker-rockylinux8-ansible:latest
# privileged: true
# command: /sbin/init
# tmpfs:
# - /run
# - /tmp
# volumes:
# - /sys/fs/cgroup:/sys/fs/cgroup:ro
service_manager: systemd

- name: keepalived-xenial
pre_build_image: yes
Expand Down
17 changes: 10 additions & 7 deletions molecule/masked-keepalived/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
- name: Converge
hosts: all
tasks:
- name: Apt update and install rsync, ping, iproute
- name: Install basic packages
ansible.builtin.package:
update_cache: yes
name:
- rsync
- inetutils-ping
- iproute2
update_cache: "{{ ansible_os_family == 'Debian' | ternary('yes', omit) }}"
name: "{{ packagelist[ansible_os_family] | default([]) }}"
state: present
when: ansible_os_family == "Debian"
vars:
packagelist:
Debian:
- iproute2
RedHat:
- iproute
- iputils

- name: Add a container to a network, leaving existing containers connected
delegate_to: localhost
Expand Down

0 comments on commit be37c73

Please sign in to comment.