1
0
Fork 0
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:
Lilian Roller 2020-03-17 15:39:07 +01:00
parent f582a80797
commit 141f3c083f
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B
5 changed files with 16 additions and 16 deletions

View file

@ -1,20 +1,20 @@
---
- name: combine sshd variable
set_fact:
sshd: "{{ _sshd|combine(sshd, recursive=True) }}"
- include_tasks: versioncheck.yml
when: submodules_versioncheck|bool
- name: register os-specific variables
include_vars: vars/default.yml
when:
- ansible_distribution != 'Fedora'
- ansible_distribution != 'Archlinux'
- ansible_distribution != 'CentOS'
- name: register os-specific variables
- name: set sshd_service variable
block:
- name: read os specific variable
include_vars: "vars/{{ ansible_distribution | lower }}.yml"
when:
- ansible_distribution == 'Fedora'
- ansible_distribution == 'Archlinux'
- ansible_distribution == 'CentOS'
rescue:
- name: read default variable
include_vars: vars/default.yml
- pause:
- name: Collect all users and groups allowed to login via ssh
set_fact:

View file

@ -1,2 +1,2 @@
---
ssh_service: sshd
sshd_service: sshd

View file

@ -1,2 +1,2 @@
---
ssh_service: sshd
sshd_service: sshd

View file

@ -1,2 +1,2 @@
---
ssh_service: ssh
sshd_service: ssh

View file

@ -1,2 +1,2 @@
---
ssh_service: sshd
sshd_service: sshd