mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-25 12:30:19 +01:00
Fix Ansible 2.3 warnings
This commit is contained in:
parent
b2ce732450
commit
43ed7c19a2
4 changed files with 5 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
.vagrant
|
||||
tests/roles/ansible-sshd
|
||||
tests/test.retry
|
||||
|
|
|
@ -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: {}
|
||||
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
service:
|
||||
name: "{{ sshd_service }}"
|
||||
state: reloaded
|
||||
when: sshd_allow_reload
|
||||
when: sshd_allow_reload and ansible_virtualization_type != 'docker'
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue