Fix Ansible 2.3 warnings

This commit is contained in:
Matt Willsher 2017-05-04 14:31:26 +01:00
parent b2ce732450
commit 43ed7c19a2
4 changed files with 5 additions and 6 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
.vagrant
tests/roles/ansible-sshd
tests/test.retry

View file

@ -4,11 +4,9 @@
sshd_skip_defaults: false
# If the below is false, don't manage the service or reload the SSH
# daemon at all
sshd_manage_service: "{{ false if ansible_virtualization_type == 'docker' else true }}"
sshd_manage_service: true
# If the below is false, don't reload the ssh deamon on change
sshd_allow_reload: "{{ sshd_manage_service }}"
# If the below is false, don't manage /var/run/sshd directory
sshd_manage_var_run: "{{ false if ansible_os_family == 'Archlinux' or (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7') else true }}"
sshd_allow_reload: true
# Empty dicts to avoid errors
sshd: {}

View file

@ -3,4 +3,4 @@
service:
name: "{{ sshd_service }}"
state: reloaded
when: sshd_allow_reload
when: sshd_allow_reload and ansible_virtualization_type != 'docker'

View file

@ -43,7 +43,7 @@
name: "{{ sshd_service }}"
enabled: true
state: started
when: sshd_manage_service
when: sshd_manage_service and ansible_virtualization_type != 'docker'
tags:
- sshd