Change all instances of ansible_distribution_major_version to filter to int for comparisons.
This commit is contained in:
parent
03633c8f0c
commit
275f4b5203
50 changed files with 74 additions and 74 deletions
|
@ -85,11 +85,11 @@
|
|||
action: service name=openvpn@openvpn state=restarted
|
||||
|
||||
- name: restart openvpn (RHEL6)
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version == "6"
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 6
|
||||
action: service name=openvpn state=restarted
|
||||
|
||||
- name: restart openvpn (RHEL7)
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version == "7"
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 7
|
||||
action: service name=openvpn@openvpn state=restarted
|
||||
|
||||
- name: restart postfix
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -45,14 +45,14 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
- collectd/base
|
||||
- apache
|
||||
- download
|
||||
- { role: mod_limitipconn, when: ansible_distribution_major_version != '7'}
|
||||
- { role: mod_limitipconn, when: ansible_distribution_major_version|int != '7'}
|
||||
- rsyncd
|
||||
- { role: nfs/client, when: datacenter == "phx2", mnt_dir: '/srv/pub', nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub' }
|
||||
- { role: nfs/client, when: datacenter == "rdu", mnt_dir: '/srv/pub', nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub' }
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- fas_client
|
||||
- nagios_client
|
||||
- hosts
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- collectd/base
|
||||
- hosts
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
- java-1.8.0-openjdk
|
||||
tags:
|
||||
- packages
|
||||
when: ansible_distribution_major_version != '7'
|
||||
when: ansible_distribution_major_version|int != 7
|
||||
|
||||
- name: add jenkins proxy config file for apache
|
||||
action: copy src="{{ files }}/jenkins/master/jenkins-apache.conf"
|
||||
|
@ -406,7 +406,7 @@
|
|||
|
||||
- name: install pkgs for jenkins for fedora systems > F19
|
||||
action: yum state=present pkg={{ item }}
|
||||
when: is_fedora is defined and ansible_distribution_major_version > 20
|
||||
when: is_fedora is defined and ansible_distribution_major_version|int > 20
|
||||
with_items:
|
||||
- sbt-extras
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- fas_client
|
||||
- nagios_client
|
||||
- hosts
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- hosts
|
||||
- fas_client
|
||||
- nagios_client
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
- rkhunter
|
||||
- rsyncd
|
||||
- sudo
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- { role: openvpn/client, when: env != "staging" }
|
||||
- { role: collectd/fedmsg-service, process: fedmsg-hub }
|
||||
- apache
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- fas_client
|
||||
- collectd/base
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- fas_client
|
||||
- nagios_client
|
||||
- hosts
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
- hosts
|
||||
- fas_client
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- sudo
|
||||
- fedmsg/base
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- collectd/base
|
||||
- hosts
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
||||
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
|
|
|
@ -56,11 +56,11 @@
|
|||
tasks:
|
||||
- name: install cloud-utils (yum)
|
||||
yum: pkg=cloud-utils state=present
|
||||
when: ansible_distribution_major_version < '22'
|
||||
when: ansible_distribution_major_version|int < 22
|
||||
|
||||
- name: install cloud-utils (dnf)
|
||||
command: dnf install -y cloud-utils
|
||||
when: ansible_distribution_major_version > '21' and ansible_cmdline.ostree is not defined
|
||||
when: ansible_distribution_major_version|int > 21 and ansible_cmdline.ostree is not defined
|
||||
|
||||
- include: "{{ tasks }}/cloud_setup_basic.yml"
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
- name: hotfix - copy over new httpd sysconfig (el6)
|
||||
copy: src="{{ files }}/hotfix/httpd/httpd.sysconfig" dest=/etc/sysconfig/httpd
|
||||
when: ansible_distribution_major_version == '6'
|
||||
when: ansible_distribution_major_version|int == 6
|
||||
notify:
|
||||
- restart apache
|
||||
tags:
|
||||
|
@ -41,7 +41,7 @@
|
|||
|
||||
- name: hotfix - copy over new httpd sysconfig (el7)
|
||||
copy: src="{{ files }}/hotfix/httpd/httpd.sysconfig" dest=/etc/sysconfig/httpd
|
||||
when: ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution_major_version|int == 7
|
||||
notify:
|
||||
- restart apache
|
||||
tags:
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
- packages
|
||||
- base
|
||||
|
||||
- debug: msg="{{ansible_nodename}} {{inventory_hostname}} {{ansible_distribution_major_version}}"
|
||||
- debug: msg="{{ansible_nodename}} {{inventory_hostname}} {{ansible_distribution_major_version|int}}"
|
||||
|
||||
- name: make sure hostname is set right on rhel7 hosts
|
||||
command: hostnamectl set-hostname {{ inventory_hostname }}
|
||||
when: ( ansible_nodename != inventory_hostname ) and ansible_distribution_major_version == '7'
|
||||
when: ( ansible_nodename != inventory_hostname ) and ansible_distribution_major_version|int == 7
|
||||
|
||||
- name: sshd_config
|
||||
copy: src={{ item }} dest=/etc/ssh/sshd_config mode=600
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
- virt-install
|
||||
tags:
|
||||
- packages
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7
|
||||
|
||||
# install libvirtd.conf
|
||||
#
|
||||
|
@ -45,7 +45,7 @@
|
|||
- restart bridge
|
||||
tags:
|
||||
- config
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7
|
||||
|
||||
- name: generate config for ethernet device
|
||||
template:
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
|
||||
- name: copy over our pstorefs/collectd selinux module (rhel6 has no pstorefs)
|
||||
copy: src=selinux/fi-pstorefs.pp dest=/usr/share/collectd/fi-pstorefs.pp
|
||||
when: ansible_distribution_major_version != '6'
|
||||
when: ansible_distribution_major_version|int != 6
|
||||
register: ficpstorefs_module
|
||||
tags:
|
||||
- collectd
|
||||
|
@ -105,7 +105,7 @@
|
|||
|
||||
- name: check to see if its even installed yet
|
||||
shell: semodule -l | grep fi-pstorefs | wc -l
|
||||
when: ansible_distribution_major_version != '6'
|
||||
when: ansible_distribution_major_version|int != 6
|
||||
register: ficpstorefs_grep
|
||||
always_run: true
|
||||
changed_when: "'0' in ficpstorefs_grep.stdout"
|
||||
|
@ -115,7 +115,7 @@
|
|||
|
||||
- name: install our pstorefs/collectd selinux module
|
||||
command: semodule -i /usr/share/collectd/fi-pstorefs.pp
|
||||
when: ansible_distribution_major_version != '6' and (ficpstorefs_module|changed or ficpstorefs_grep|changed)
|
||||
when: ansible_distribution_major_version|int != 6 and (ficpstorefs_module|changed or ficpstorefs_grep|changed)
|
||||
tags:
|
||||
- collectd
|
||||
- selinux
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
- name: install nss_db on rhel hosts only
|
||||
yum: state=present name=nss_db
|
||||
when: is_rhel is defined and ansible_distribution_major_version == '6'
|
||||
when: is_rhel is defined and ansible_distribution_major_version|int == 6
|
||||
tags:
|
||||
- packages
|
||||
- fas_client
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
owner=fedmsg
|
||||
group=fedmsg
|
||||
state=directory
|
||||
when: ansible_distribution_major_version == '6'
|
||||
when: ansible_distribution_major_version|int == 6
|
||||
tags:
|
||||
- fedmsg/base
|
||||
|
||||
|
|
|
@ -7,25 +7,25 @@
|
|||
# If NOT using xinetd
|
||||
- name: delete stock git daemon config
|
||||
file: path="/usr/lib/systemd/system/git.service" state=absent
|
||||
when: ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution_major_version|int == 7
|
||||
|
||||
- name: configure git daemon
|
||||
template: >
|
||||
src="git@.service.j2"
|
||||
dest="/usr/lib/systemd/system/git@.service"
|
||||
mode=0644
|
||||
when: ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution_major_version|int == 7
|
||||
|
||||
# If using xinetd
|
||||
- name: install xinetd
|
||||
yum: pkg=xinetd state=present
|
||||
when: ansible_distribution_major_version == '6'
|
||||
when: ansible_distribution_major_version|int == 6
|
||||
|
||||
- name: install the xinetd config file
|
||||
template: >
|
||||
src="git.j2"
|
||||
dest="/etc/xinetd.d/git"
|
||||
mode=0644
|
||||
when: ansible_distribution_major_version == '6'
|
||||
when: ansible_distribution_major_version|int == 6
|
||||
notify:
|
||||
- restart xinetd
|
||||
|
|
|
@ -231,7 +231,7 @@
|
|||
register: max_loop
|
||||
always_run: yes
|
||||
changed_when: '1 != 1'
|
||||
when: ansible_distribution_major_version != '6' and ansible_architecture == 'x86_64'
|
||||
when: ansible_distribution_major_version|int != 6 and ansible_architecture == 'x86_64'
|
||||
tags:
|
||||
- koji_builder
|
||||
|
||||
|
@ -240,7 +240,7 @@
|
|||
register: max_loop
|
||||
always_run: yes
|
||||
changed_when: '1 != 1'
|
||||
when: ansible_distribution == 'RedHat' and ansible_architecture == 'x86_64' and ansible_distribution_major_version == '6'
|
||||
when: ansible_distribution == 'RedHat' and ansible_architecture == 'x86_64' and ansible_distribution_major_version|int == 6
|
||||
tags:
|
||||
- koji_builder
|
||||
|
||||
|
@ -259,7 +259,7 @@
|
|||
yum: state=present pkg={{ item }}
|
||||
with_items:
|
||||
- kmod-hfsplus
|
||||
when: is_rhel is defined and ansible_architecture == 'x86_64' and ansible_distribution_major_version == '6'
|
||||
when: is_rhel is defined and ansible_architecture == 'x86_64' and ansible_distribution_major_version|int == '6'
|
||||
tags:
|
||||
- koji_builder
|
||||
|
||||
|
|
|
@ -235,14 +235,14 @@
|
|||
tags:
|
||||
- selinux
|
||||
- koji_hub
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version == "6"
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 6
|
||||
|
||||
- name: set sebooleans so koji can anon write
|
||||
seboolean: name=httpd_anon_write state=true persistent=true
|
||||
tags:
|
||||
- selinux
|
||||
- koji_hub
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version == "7"
|
||||
when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 7
|
||||
|
||||
- name: Set httpd to run on boot
|
||||
service: name=httpd enabled=yes
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
file: state=directory path=/etc/systemd/system/memcached.service.d mode=0755 owner=root group=root
|
||||
tags:
|
||||
- memcached
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7
|
||||
|
||||
- name: make systemd override config
|
||||
copy: src=memcached-systemdoverride.conf dest=/etc/systemd/system/memcached.service.d/
|
||||
|
@ -32,4 +32,4 @@
|
|||
- memcached
|
||||
notify:
|
||||
- reload systemd
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
- name: install our custom selinux module
|
||||
command: semodule -i /usr/share/nrpe/fi-nrpe.pp
|
||||
when: ansible_distribution_major_version == '7' and selinux_module|changed
|
||||
when: ansible_distribution_major_version|int == 7 and selinux_module|changed
|
||||
|
||||
|
||||
# Set up our base config.
|
||||
|
|
|
@ -30,14 +30,14 @@
|
|||
with_items:
|
||||
- rpcbind
|
||||
- nfs-lock
|
||||
when: ansible_distribution == 'Fedora' and ansible_distribution_major_version == '20'
|
||||
when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int == 20
|
||||
|
||||
- name: enable nfs-related services and run them (rhel7)
|
||||
service: name={{ item }} enabled=true state=started
|
||||
with_items:
|
||||
- rpcbind
|
||||
- nfs-lock
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7
|
||||
|
||||
- name: enable nfs-related services and run them (rhel6)
|
||||
action: service name={{ item }} enabled=true state=started
|
||||
|
@ -46,7 +46,7 @@
|
|||
- rpcbind
|
||||
- nfs
|
||||
- nfslock
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '6'
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 6
|
||||
|
||||
- name: nfs mount points (phx2)
|
||||
mount: >
|
||||
|
|
|
@ -33,14 +33,14 @@
|
|||
|
||||
- name: enable openvpn service for rhel 6
|
||||
service: name=openvpn state=running enabled=true
|
||||
when: ansible_distribution_major_version == '6'
|
||||
when: ansible_distribution_major_version|int == 6
|
||||
tags:
|
||||
- service
|
||||
- openvpn
|
||||
|
||||
- name: Make sure openvpn is running in rhel 7.1
|
||||
service: name=openvpn@openvpn state=running enabled=true
|
||||
when: ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution_major_version|int == 7
|
||||
tags:
|
||||
- service
|
||||
- openvpn
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- ntp
|
||||
- libsemanage-python
|
||||
- libselinux-python
|
||||
when: ansible_distribution_major_version < '22'
|
||||
when: ansible_distribution_major_version|int < 22
|
||||
tags:
|
||||
- packages
|
||||
|
||||
|
@ -56,14 +56,14 @@
|
|||
- name: update all
|
||||
command: yum -y update creates=/etc/sysconfig/global-update-applied
|
||||
register: updated
|
||||
when: ansible_distribution_major_version < '22'
|
||||
when: ansible_distribution_major_version|int < 22
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: update all
|
||||
command: dnf -y update creates=/etc/sysconfig/global-update-applied
|
||||
register: updated
|
||||
when: ansible_distribution_major_version > '21' and ansible_cmdline.ostree is not defined
|
||||
when: ansible_distribution_major_version|int > 21 and ansible_cmdline.ostree is not defined
|
||||
tags:
|
||||
- packages
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
- python-virtinst
|
||||
tags:
|
||||
- packages
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '6'
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 6
|
||||
|
||||
- name: install libvirt packages on rhel7 virthosts
|
||||
yum: pkg={{ item }} state=present
|
||||
|
@ -22,7 +22,7 @@
|
|||
- virt-install
|
||||
tags:
|
||||
- packages
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7
|
||||
|
||||
# install libvirtd.conf
|
||||
#
|
||||
|
@ -50,4 +50,4 @@
|
|||
- restart bridge
|
||||
tags:
|
||||
- config
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
with_items:
|
||||
- epel6.repo
|
||||
- rhel6.repo
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '6'
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 6
|
||||
tags:
|
||||
- config
|
||||
- packages
|
||||
|
@ -15,7 +15,7 @@
|
|||
with_items:
|
||||
- epel7.repo
|
||||
- rhel7.repo
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7'
|
||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7
|
||||
tags:
|
||||
- config
|
||||
- packages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue