-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
38 lines (33 loc) · 1.72 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
---
# Copyright (c) 2021-2024 Jakob Meng, <jakobmeng@web.de>
# vim:set fileformat=unix tabstop=2 shiftwidth=2 expandtab:
# kate: end-of-line unix; space-indent on; indent-width 2; remove-trailing-spaces modified;
# Variable distribution_id is a list which uniquely identifies a distribution release, e.g.
# ['CentOS', '8'] for CentOS 8 (both Core and Stream)
# ['Debian', '10'] for Debian 10 (Buster)
# ['Red Hat Enterprise Linux', '8' ]` for Red Hat Enterprise Linux (RHEL) 8
# ['Ubuntu', '20.04' ] for Ubuntu 20.04 LTS (Focal Fossa)
#
# NOTE: Version numbers for upcoming Debian releases are not stable. For example, when lsb_release is available, which
# is the default, Ansible will report 'n/a' for Debian's testing and unstable (Sid) distributions. When lsb_release
# has been uninstalled, the version string will be 'trixie/sid' or similar. In the past, 'NA' would be reported when
# lsb_release was not available and 'testing' or 'sid' when it was installed.
distribution_id:
- '{{ ansible_facts.distribution }}'
- # Use major and minor version for Ubuntu, e.g. Ubuntu 18.04 LTS (Bionic Beaver) or Ubuntu 20.04 LTS (Focal Fossa).
# Use major version for all other distributions, e.g. CentOS 7, Debian 10 (Buster) or Red Hat Enterprise Linux 8.
"{{ ansible_facts.distribution_version if ansible_facts.distribution == 'Ubuntu' else
ansible_facts.distribution_major_version }}"
tftpd_config: []
tftpd_service_enabled: true
tftpd_service_name: |-
{{
{
'CentOS': 'tftp.service',
'Debian': 'tftpd-hpa',
'Fedora': 'tftp.service',
'Red_Hat_Enterprise_Linux': 'tftp.service',
'Ubuntu': 'tftpd-hpa'
}[distribution_id | first | regex_replace('[^A-Za-z0-9_]', '_')]
}}
tftpd_service_state: 'started'