mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-22 02:50:18 +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
|
.vagrant
|
||||||
tests/roles/ansible-sshd
|
tests/roles/ansible-sshd
|
||||||
|
tests/test.retry
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
sshd_skip_defaults: false
|
sshd_skip_defaults: false
|
||||||
# If the below is false, don't manage the service or reload the SSH
|
# If the below is false, don't manage the service or reload the SSH
|
||||||
# daemon at all
|
# 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
|
# If the below is false, don't reload the ssh deamon on change
|
||||||
sshd_allow_reload: "{{ sshd_manage_service }}"
|
sshd_allow_reload: true
|
||||||
# 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 }}"
|
|
||||||
# Empty dicts to avoid errors
|
# Empty dicts to avoid errors
|
||||||
sshd: {}
|
sshd: {}
|
||||||
|
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
service:
|
service:
|
||||||
name: "{{ sshd_service }}"
|
name: "{{ sshd_service }}"
|
||||||
state: reloaded
|
state: reloaded
|
||||||
when: sshd_allow_reload
|
when: sshd_allow_reload and ansible_virtualization_type != 'docker'
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
name: "{{ sshd_service }}"
|
name: "{{ sshd_service }}"
|
||||||
enabled: true
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
when: sshd_manage_service
|
when: sshd_manage_service and ansible_virtualization_type != 'docker'
|
||||||
tags:
|
tags:
|
||||||
- sshd
|
- sshd
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue