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
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue