mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-28 21:50:18 +01:00
Move the common variables to separate file
This commit is contained in:
parent
bcbdf92182
commit
c515ffdf94
4 changed files with 13 additions and 16 deletions
|
@ -81,11 +81,3 @@ __sshd_sysconfig_supports_use_strong_rng: false
|
|||
|
||||
__sshd_runtime_directory: false
|
||||
__sshd_runtime_directory_mode: "0755"
|
||||
|
||||
__sshd_skip_virt_env:
|
||||
- kvm
|
||||
- docker
|
||||
- podman
|
||||
- container
|
||||
- containerd
|
||||
- VirtualPC
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
---
|
||||
- name: Set common vars
|
||||
include_vars: vars/common.yml
|
||||
|
||||
- name: Set OS dependent variables
|
||||
include_vars: "{{ lookup('first_found', params) }}"
|
||||
vars:
|
||||
|
|
|
@ -25,19 +25,14 @@
|
|||
- __sshd_test_backup is defined
|
||||
- __sshd_test_backup.path is defined
|
||||
|
||||
- name: Include common variables
|
||||
include_vars: ../../vars/common.yml
|
||||
|
||||
- name: Restart sshd service
|
||||
service:
|
||||
name: sshd
|
||||
state: reloaded
|
||||
changed_when: false
|
||||
vars:
|
||||
__sshd_skip_virt_env:
|
||||
- kvm
|
||||
- docker
|
||||
- podman
|
||||
- container
|
||||
- containerd
|
||||
- VirtualPC
|
||||
when:
|
||||
- __sshd_test_backup is defined
|
||||
- ansible_virtualization_type|default(None) not in __sshd_skip_virt_env
|
||||
|
|
7
vars/common.yml
Normal file
7
vars/common.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
__sshd_skip_virt_env:
|
||||
- kvm
|
||||
- docker
|
||||
- podman
|
||||
- container
|
||||
- containerd
|
||||
- VirtualPC
|
Loading…
Reference in a new issue