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

@ -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