Change all instances of ansible_distribution_major_version to filter to int for comparisons.

This commit is contained in:
Kevin Fenzi 2015-05-27 22:27:39 +00:00
parent 03633c8f0c
commit 275f4b5203
50 changed files with 74 additions and 74 deletions

View file

@ -85,11 +85,11 @@
action: service name=openvpn@openvpn state=restarted action: service name=openvpn@openvpn state=restarted
- name: restart openvpn (RHEL6) - 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 action: service name=openvpn state=restarted
- name: restart openvpn (RHEL7) - 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 action: service name=openvpn@openvpn state=restarted
- name: restart postfix - name: restart postfix

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -17,7 +17,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -27,7 +27,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -27,7 +27,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -29,7 +29,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -45,14 +45,14 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client
- collectd/base - collectd/base
- apache - apache
- download - download
- { role: mod_limitipconn, when: ansible_distribution_major_version != '7'} - { role: mod_limitipconn, when: ansible_distribution_major_version|int != '7'}
- rsyncd - 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 == "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' } - { role: nfs/client, when: datacenter == "rdu", mnt_dir: '/srv/pub', nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub' }

View file

@ -27,7 +27,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -30,7 +30,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- fas_client - fas_client
- nagios_client - nagios_client
- hosts - hosts

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- collectd/base - collectd/base
- hosts - hosts

View file

@ -58,7 +58,7 @@
- java-1.8.0-openjdk - java-1.8.0-openjdk
tags: tags:
- packages - packages
when: ansible_distribution_major_version != '7' when: ansible_distribution_major_version|int != 7
- name: add jenkins proxy config file for apache - name: add jenkins proxy config file for apache
action: copy src="{{ files }}/jenkins/master/jenkins-apache.conf" action: copy src="{{ files }}/jenkins/master/jenkins-apache.conf"
@ -406,7 +406,7 @@
- name: install pkgs for jenkins for fedora systems > F19 - name: install pkgs for jenkins for fedora systems > F19
action: yum state=present pkg={{ item }} 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: with_items:
- sbt-extras - sbt-extras

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -31,7 +31,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -33,7 +33,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- fas_client - fas_client
- nagios_client - nagios_client
- hosts - hosts

View file

@ -27,7 +27,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- hosts - hosts
- fas_client - fas_client
- nagios_client - nagios_client

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -39,7 +39,7 @@
- rkhunter - rkhunter
- rsyncd - rsyncd
- sudo - 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: openvpn/client, when: env != "staging" }
- { role: collectd/fedmsg-service, process: fedmsg-hub } - { role: collectd/fedmsg-service, process: fedmsg-hub }
- apache - apache

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -27,7 +27,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- fas_client - fas_client
- collectd/base - collectd/base

View file

@ -33,7 +33,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- fas_client - fas_client
- nagios_client - nagios_client
- hosts - hosts

View file

@ -14,7 +14,7 @@
- hosts - hosts
- fas_client - fas_client
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- sudo - sudo
- fedmsg/base - fedmsg/base

View file

@ -29,7 +29,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- collectd/base - collectd/base
- hosts - hosts

View file

@ -32,7 +32,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -15,7 +15,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -13,7 +13,7 @@
roles: roles:
- base - base
- rkhunter - rkhunter
- { role: denyhosts, when: ansible_distribution_major_version != '7' } - { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client - nagios_client
- hosts - hosts
- fas_client - fas_client

View file

@ -56,11 +56,11 @@
tasks: tasks:
- name: install cloud-utils (yum) - name: install cloud-utils (yum)
yum: pkg=cloud-utils state=present yum: pkg=cloud-utils state=present
when: ansible_distribution_major_version < '22' when: ansible_distribution_major_version|int < 22
- name: install cloud-utils (dnf) - name: install cloud-utils (dnf)
command: dnf install -y cloud-utils 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" - include: "{{ tasks }}/cloud_setup_basic.yml"

View file

@ -31,7 +31,7 @@
- name: hotfix - copy over new httpd sysconfig (el6) - name: hotfix - copy over new httpd sysconfig (el6)
copy: src="{{ files }}/hotfix/httpd/httpd.sysconfig" dest=/etc/sysconfig/httpd 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: notify:
- restart apache - restart apache
tags: tags:
@ -41,7 +41,7 @@
- name: hotfix - copy over new httpd sysconfig (el7) - name: hotfix - copy over new httpd sysconfig (el7)
copy: src="{{ files }}/hotfix/httpd/httpd.sysconfig" dest=/etc/sysconfig/httpd 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: notify:
- restart apache - restart apache
tags: tags:

View file

@ -27,11 +27,11 @@
- packages - packages
- base - 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 - name: make sure hostname is set right on rhel7 hosts
command: hostnamectl set-hostname {{ inventory_hostname }} 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 - name: sshd_config
copy: src={{ item }} dest=/etc/ssh/sshd_config mode=600 copy: src={{ item }} dest=/etc/ssh/sshd_config mode=600

View file

@ -16,7 +16,7 @@
- virt-install - virt-install
tags: tags:
- packages - 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 # install libvirtd.conf
# #
@ -45,7 +45,7 @@
- restart bridge - restart bridge
tags: tags:
- config - 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 - name: generate config for ethernet device
template: template:

View file

@ -97,7 +97,7 @@
- name: copy over our pstorefs/collectd selinux module (rhel6 has no pstorefs) - 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 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 register: ficpstorefs_module
tags: tags:
- collectd - collectd
@ -105,7 +105,7 @@
- name: check to see if its even installed yet - name: check to see if its even installed yet
shell: semodule -l | grep fi-pstorefs | wc -l shell: semodule -l | grep fi-pstorefs | wc -l
when: ansible_distribution_major_version != '6' when: ansible_distribution_major_version|int != 6
register: ficpstorefs_grep register: ficpstorefs_grep
always_run: true always_run: true
changed_when: "'0' in ficpstorefs_grep.stdout" changed_when: "'0' in ficpstorefs_grep.stdout"
@ -115,7 +115,7 @@
- name: install our pstorefs/collectd selinux module - name: install our pstorefs/collectd selinux module
command: semodule -i /usr/share/collectd/fi-pstorefs.pp 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: tags:
- collectd - collectd
- selinux - selinux

View file

@ -19,7 +19,7 @@
- name: install nss_db on rhel hosts only - name: install nss_db on rhel hosts only
yum: state=present name=nss_db 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: tags:
- packages - packages
- fas_client - fas_client

View file

@ -24,7 +24,7 @@
owner=fedmsg owner=fedmsg
group=fedmsg group=fedmsg
state=directory state=directory
when: ansible_distribution_major_version == '6' when: ansible_distribution_major_version|int == 6
tags: tags:
- fedmsg/base - fedmsg/base

View file

@ -7,25 +7,25 @@
# If NOT using xinetd # If NOT using xinetd
- name: delete stock git daemon config - name: delete stock git daemon config
file: path="/usr/lib/systemd/system/git.service" state=absent 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 - name: configure git daemon
template: > template: >
src="git@.service.j2" src="git@.service.j2"
dest="/usr/lib/systemd/system/git@.service" dest="/usr/lib/systemd/system/git@.service"
mode=0644 mode=0644
when: ansible_distribution_major_version == '7' when: ansible_distribution_major_version|int == 7
# If using xinetd # If using xinetd
- name: install xinetd - name: install xinetd
yum: pkg=xinetd state=present yum: pkg=xinetd state=present
when: ansible_distribution_major_version == '6' when: ansible_distribution_major_version|int == 6
- name: install the xinetd config file - name: install the xinetd config file
template: > template: >
src="git.j2" src="git.j2"
dest="/etc/xinetd.d/git" dest="/etc/xinetd.d/git"
mode=0644 mode=0644
when: ansible_distribution_major_version == '6' when: ansible_distribution_major_version|int == 6
notify: notify:
- restart xinetd - restart xinetd

View file

@ -231,7 +231,7 @@
register: max_loop register: max_loop
always_run: yes always_run: yes
changed_when: '1 != 1' 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: tags:
- koji_builder - koji_builder
@ -240,7 +240,7 @@
register: max_loop register: max_loop
always_run: yes always_run: yes
changed_when: '1 != 1' 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: tags:
- koji_builder - koji_builder
@ -259,7 +259,7 @@
yum: state=present pkg={{ item }} yum: state=present pkg={{ item }}
with_items: with_items:
- kmod-hfsplus - 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: tags:
- koji_builder - koji_builder

View file

@ -235,14 +235,14 @@
tags: tags:
- selinux - selinux
- koji_hub - 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 - name: set sebooleans so koji can anon write
seboolean: name=httpd_anon_write state=true persistent=true seboolean: name=httpd_anon_write state=true persistent=true
tags: tags:
- selinux - selinux
- koji_hub - 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 - name: Set httpd to run on boot
service: name=httpd enabled=yes service: name=httpd enabled=yes

View file

@ -24,7 +24,7 @@
file: state=directory path=/etc/systemd/system/memcached.service.d mode=0755 owner=root group=root file: state=directory path=/etc/systemd/system/memcached.service.d mode=0755 owner=root group=root
tags: tags:
- memcached - 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 - name: make systemd override config
copy: src=memcached-systemdoverride.conf dest=/etc/systemd/system/memcached.service.d/ copy: src=memcached-systemdoverride.conf dest=/etc/systemd/system/memcached.service.d/
@ -32,4 +32,4 @@
- memcached - memcached
notify: notify:
- reload systemd - reload systemd
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7' when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7

View file

@ -58,7 +58,7 @@
- name: install our custom selinux module - name: install our custom selinux module
command: semodule -i /usr/share/nrpe/fi-nrpe.pp 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. # Set up our base config.

View file

@ -30,14 +30,14 @@
with_items: with_items:
- rpcbind - rpcbind
- nfs-lock - 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) - name: enable nfs-related services and run them (rhel7)
service: name={{ item }} enabled=true state=started service: name={{ item }} enabled=true state=started
with_items: with_items:
- rpcbind - rpcbind
- nfs-lock - 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) - name: enable nfs-related services and run them (rhel6)
action: service name={{ item }} enabled=true state=started action: service name={{ item }} enabled=true state=started
@ -46,7 +46,7 @@
- rpcbind - rpcbind
- nfs - nfs
- nfslock - 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) - name: nfs mount points (phx2)
mount: > mount: >

View file

@ -33,14 +33,14 @@
- name: enable openvpn service for rhel 6 - name: enable openvpn service for rhel 6
service: name=openvpn state=running enabled=true service: name=openvpn state=running enabled=true
when: ansible_distribution_major_version == '6' when: ansible_distribution_major_version|int == 6
tags: tags:
- service - service
- openvpn - openvpn
- name: Make sure openvpn is running in rhel 7.1 - name: Make sure openvpn is running in rhel 7.1
service: name=openvpn@openvpn state=running enabled=true service: name=openvpn@openvpn state=running enabled=true
when: ansible_distribution_major_version == '7' when: ansible_distribution_major_version|int == 7
tags: tags:
- service - service
- openvpn - openvpn

View file

@ -7,7 +7,7 @@
- ntp - ntp
- libsemanage-python - libsemanage-python
- libselinux-python - libselinux-python
when: ansible_distribution_major_version < '22' when: ansible_distribution_major_version|int < 22
tags: tags:
- packages - packages
@ -56,14 +56,14 @@
- name: update all - name: update all
command: yum -y update creates=/etc/sysconfig/global-update-applied command: yum -y update creates=/etc/sysconfig/global-update-applied
register: updated register: updated
when: ansible_distribution_major_version < '22' when: ansible_distribution_major_version|int < 22
tags: tags:
- packages - packages
- name: update all - name: update all
command: dnf -y update creates=/etc/sysconfig/global-update-applied command: dnf -y update creates=/etc/sysconfig/global-update-applied
register: updated 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: tags:
- packages - packages

View file

@ -12,7 +12,7 @@
- python-virtinst - python-virtinst
tags: tags:
- packages - 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 - name: install libvirt packages on rhel7 virthosts
yum: pkg={{ item }} state=present yum: pkg={{ item }} state=present
@ -22,7 +22,7 @@
- virt-install - virt-install
tags: tags:
- packages - 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 # install libvirtd.conf
# #
@ -50,4 +50,4 @@
- restart bridge - restart bridge
tags: tags:
- config - config
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7' when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7

View file

@ -4,7 +4,7 @@
with_items: with_items:
- epel6.repo - epel6.repo
- rhel6.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: tags:
- config - config
- packages - packages
@ -15,7 +15,7 @@
with_items: with_items:
- epel7.repo - epel7.repo
- rhel7.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: tags:
- config - config
- packages - packages