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'
|
|
||||||
- ansible_distribution != 'Archlinux'
|
|
||||||
- ansible_distribution != 'CentOS'
|
|
||||||
|
|
||||||
- name: register os-specific variables
|
|
||||||
include_vars: "vars/{{ ansible_distribution | lower }}.yml"
|
include_vars: "vars/{{ ansible_distribution | lower }}.yml"
|
||||||
when:
|
rescue:
|
||||||
- ansible_distribution == 'Fedora'
|
- name: read default variable
|
||||||
- ansible_distribution == 'Archlinux'
|
include_vars: vars/default.yml
|
||||||
- ansible_distribution == 'CentOS'
|
|
||||||
|
- pause:
|
||||||
|
|
||||||
- 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