mirror of
https://github.com/roles-ansible/ansible_role_sshd.git
synced 2024-08-16 11:59:49 +02:00
optimize sshd_service var
This commit is contained in:
parent
f582a80797
commit
141f3c083f
5 changed files with 16 additions and 16 deletions
|
@ -1,20 +1,20 @@
|
||||||
---
|
---
|
||||||
|
- name: combine sshd variable
|
||||||
|
set_fact:
|
||||||
|
sshd: "{{ _sshd|combine(sshd, recursive=True) }}"
|
||||||
|
|
||||||
- include_tasks: versioncheck.yml
|
- include_tasks: versioncheck.yml
|
||||||
when: submodules_versioncheck|bool
|
when: submodules_versioncheck|bool
|
||||||
|
|
||||||
- name: register os-specific variables
|
- name: set sshd_service variable
|
||||||
include_vars: vars/default.yml
|
block:
|
||||||
when:
|
- name: read os specific variable
|
||||||
- ansible_distribution != 'Fedora'
|
include_vars: "vars/{{ ansible_distribution | lower }}.yml"
|
||||||
- ansible_distribution != 'Archlinux'
|
rescue:
|
||||||
- ansible_distribution != 'CentOS'
|
- name: read default variable
|
||||||
|
include_vars: vars/default.yml
|
||||||
|
|
||||||
- name: register os-specific variables
|
- pause:
|
||||||
include_vars: "vars/{{ ansible_distribution | lower }}.yml"
|
|
||||||
when:
|
|
||||||
- ansible_distribution == 'Fedora'
|
|
||||||
- ansible_distribution == 'Archlinux'
|
|
||||||
- ansible_distribution == 'CentOS'
|
|
||||||
|
|
||||||
- name: Collect all users and groups allowed to login via ssh
|
- name: Collect all users and groups allowed to login via ssh
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
---
|
---
|
||||||
ssh_service: sshd
|
sshd_service: sshd
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
---
|
---
|
||||||
ssh_service: sshd
|
sshd_service: sshd
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
---
|
---
|
||||||
ssh_service: ssh
|
sshd_service: ssh
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
---
|
---
|
||||||
ssh_service: sshd
|
sshd_service: sshd
|
||||||
|
|
Loading…
Reference in a new issue