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 - 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:

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