mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-22 11:00:19 +01:00
Merge pull request #57 from willshersystems/ansible23_fixes
Ansible23 fixes
This commit is contained in:
commit
7009c82b50
4 changed files with 5 additions and 15 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'
|
||||
|
|
|
@ -26,15 +26,6 @@
|
|||
tags:
|
||||
- sshd
|
||||
|
||||
- name: Run directory
|
||||
file:
|
||||
path: /var/run/sshd
|
||||
state: directory
|
||||
mode: 0755
|
||||
when: sshd_manage_var_run
|
||||
tags:
|
||||
- sshd
|
||||
|
||||
- name: Configuration
|
||||
template:
|
||||
src: sshd_config.j2
|
||||
|
@ -52,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