adjust "when" conditions to support RHEL8 naming
This commit is contained in:
parent
50a8dc1248
commit
6f29a3904e
5 changed files with 8 additions and 8 deletions
|
@ -26,7 +26,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- libselinux-python
|
- libselinux-python
|
||||||
- sudo
|
- sudo
|
||||||
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "Fedora"] and not is_atomic
|
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "RedHat", "Fedora"] and not is_atomic
|
||||||
|
|
||||||
- name: enable fastestmirror (fedora - non-atomic)
|
- name: enable fastestmirror (fedora - non-atomic)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
when: ansible_distribution in ["Debian", "Ubuntu"]
|
when: ansible_distribution in ["Debian", "Ubuntu"]
|
||||||
|
|
||||||
- include_tasks: el.yml
|
- include_tasks: el.yml
|
||||||
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "Fedora"]
|
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "RedHat", "Fedora"]
|
||||||
|
|
||||||
- name: print generated password for {{ username }} on each host
|
- name: print generated password for {{ username }} on each host
|
||||||
debug: var=pwgen
|
debug: var=pwgen
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
package:
|
package:
|
||||||
name: docker
|
name: docker
|
||||||
state: latest
|
state: latest
|
||||||
when: ansible_distribution in ["CentOS", "Fedora", "Red Hat Enterprise Linux"] and not is_atomic
|
when: ansible_distribution in ["CentOS", "Fedora", "Red Hat Enterprise Linux", "RedHat"] and not is_atomic
|
||||||
register: docker_installed
|
register: docker_installed
|
||||||
|
|
||||||
- name: add {{ username }} to 'dockerroot' group
|
- name: add {{ username }} to 'dockerroot' group
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
name: "{{ username }}"
|
name: "{{ username }}"
|
||||||
groups: dockerroot
|
groups: dockerroot
|
||||||
append: yes
|
append: yes
|
||||||
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux"] and not is_atomic
|
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "RedHat"] and not is_atomic
|
||||||
|
|
||||||
|
|
||||||
- name: copy daemon.json
|
- name: copy daemon.json
|
||||||
|
@ -22,11 +22,11 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux"] and not is_atomic
|
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "RedHat"] and not is_atomic
|
||||||
|
|
||||||
- name: enable/start docker
|
- name: enable/start docker
|
||||||
service:
|
service:
|
||||||
name: docker
|
name: docker
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
when: ansible_distribution in ["CentOS", "Fedora", "Red Hat Enterprise Linux"] and not is_atomic
|
when: ansible_distribution in ["CentOS", "Fedora", "Red Hat Enterprise Linux", "RedHat"] and not is_atomic
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
when: ansible_distribution in ["Debian", "Ubuntu"]
|
when: ansible_distribution in ["Debian", "Ubuntu"]
|
||||||
|
|
||||||
- include_tasks: el.yml
|
- include_tasks: el.yml
|
||||||
when: ansible_distribution in ["CentOS" , "Red Hat Enterprise Linux", "Fedora"] and not is_atomic
|
when: ansible_distribution in ["CentOS" , "Red Hat Enterprise Linux", "RedHat", "Fedora"] and not is_atomic
|
||||||
|
|
||||||
# Need an idempotent way to install packages on atomic
|
# Need an idempotent way to install packages on atomic
|
||||||
# command module isn't idempotent and the package module insists on installing containers.
|
# command module isn't idempotent and the package module insists on installing containers.
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
package:
|
package:
|
||||||
name: '*'
|
name: '*'
|
||||||
state: latest
|
state: latest
|
||||||
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "Debian", "Ubuntu"] and not is_atomic
|
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "RedHat", "Debian", "Ubuntu"] and not is_atomic
|
||||||
register: host_upgraded
|
register: host_upgraded
|
||||||
|
|
||||||
- name: reboot updated hosts
|
- name: reboot updated hosts
|
||||||
|
|
Loading…
Reference in a new issue