This repository has been archived by the owner on Feb 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.yml
69 lines (56 loc) · 1.62 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
# -----------------------------------------------------------------------------
# distro / os handles
# -----------------------------------------------------------------------------
__ssh_distro: >-
{{ ansible_distribution | lower }}
__ssh_os: >-
{{ ansible_os_family | lower }}
__ssh_distro_version: >-
{{ __ssh_distro }}_{{ ansible_distribution_major_version }}
__ssh_os_version: >-
{{ __ssh_os }}_{{ ansible_distribution_major_version }}
# -----------------------------------------------------------------------------
# first found snippets
# -----------------------------------------------------------------------------
__ssh_first_found:
- '{{ __ssh_distro_version }}'
- '{{ __ssh_os_version }}'
- '{{ __ssh_distro }}'
- '{{ __ssh_os }}'
- default
__ssh_vars_files:
files: >-
{{ __ssh_first_found | map('regex_replace', '$', '.yml') | list }}
paths:
- vars
__ssh_sshd_config_templates:
files: >-
{{
__ssh_first_found |
map('regex_replace', '^', 'sshd_config_') |
map('regex_replace', '$', '.conf') |
list
}}
paths:
- templates
__ssh_sshd_config_d_templates:
files: >-
{{
__ssh_first_found |
map('regex_replace', '^', 'sshd_config_d_') |
map('regex_replace', '$', '.conf') |
list
}}
paths:
- templates
# -----------------------------------------------------------------------------
# other
# -----------------------------------------------------------------------------
__ssh_virtualized: >-
{{
ansible_facts.virtualization_role == "guest"
and
ansible_facts.virtualization_type == "docker"
}}
...