diff options
Diffstat (limited to 'roles/fedora')
-rw-r--r-- | roles/fedora/defaults/main.yml | 30 | ||||
-rw-r--r-- | roles/fedora/tasks/dnf.yml | 6 | ||||
-rw-r--r-- | roles/fedora/tasks/resolved.yml | 4 | ||||
-rw-r--r-- | roles/fedora/tasks/systemd.yml | 6 | ||||
-rw-r--r-- | roles/fedora/tasks/timesyncd.yml | 4 | ||||
-rw-r--r-- | roles/fedora/templates/locale.conf.j2 | 2 |
6 files changed, 40 insertions, 12 deletions
diff --git a/roles/fedora/defaults/main.yml b/roles/fedora/defaults/main.yml index d12cc0d..3c25cf9 100644 --- a/roles/fedora/defaults/main.yml +++ b/roles/fedora/defaults/main.yml @@ -3,19 +3,30 @@ use_resolved: true use_networkd: true use_timesyncd: true -locale: - default: - LANG: 'en_US.UTF-8' +locale_default: + LANG: 'en_US.UTF-8' -systemd_conf: {} -journald_conf: {} -logind_conf: {} -resolved_conf: {} -timesyncd_conf: {} +systemd_conf_default: {} +systemd_conf_role: {} + +journald_conf_default: {} +journald_conf_role: {} + +logind_conf_default: {} +logind_conf_role: {} + +resolved_conf_default: {} +resolved_conf_role: {} + +timesyncd_conf_default: {} +timesyncd_conf_role: {} + +dnf_conf_default: {} +dnf_conf_role: {} dnf_makecache: false -dnf_packages: +dnf_packages_default: 'glibc-langpack-en': present 'initscripts': present 'hostname': present @@ -24,6 +35,7 @@ dnf_packages: 'vim-enhanced': present 'dnf-command(leaves)': present 'python-unversioned-command': present +dnf_packages_role: {} sudo_group: 'wheel' diff --git a/roles/fedora/tasks/dnf.yml b/roles/fedora/tasks/dnf.yml index aa0207e..73f5b4b 100644 --- a/roles/fedora/tasks/dnf.yml +++ b/roles/fedora/tasks/dnf.yml @@ -1,5 +1,7 @@ --- - name: Configure dnf.conf + vars: + dnf_conf: '{{ dnf_conf_default|combine(dnf_conf_role) }}' ini_file: path: '/etc/dnf/dnf.conf' no_extra_spaces: yes @@ -11,6 +13,8 @@ with_dict: '{{ dnf_conf }}' - name: Remove packages + vars: + dnf_packages: '{{ dnf_packages_default|combine(dnf_packages_role) }}' dnf: name: "{{ dnf_packages|dictsort(true)|selectattr(1,'equalto','absent')|map(attribute=0)|list }}" state: absent @@ -26,6 +30,8 @@ - packages - name: Install packages + vars: + dnf_packages: '{{ dnf_packages_default|combine(dnf_packages_role) }}' dnf: name: "{{ dnf_packages|dictsort(true)|selectattr(1,'equalto','present')|map(attribute=0)|list }}" state: present diff --git a/roles/fedora/tasks/resolved.yml b/roles/fedora/tasks/resolved.yml index 9a6d4c1..4fcc34b 100644 --- a/roles/fedora/tasks/resolved.yml +++ b/roles/fedora/tasks/resolved.yml @@ -1,5 +1,7 @@ --- -- name: Configure systemd-resolved +- name: Configure resolved.conf + vars: + resolved_conf: '{{ resolved_conf_default|combine(resolved_conf_role) }}' ini_file: path: '/etc/systemd/resolved.conf' no_extra_spaces: yes diff --git a/roles/fedora/tasks/systemd.yml b/roles/fedora/tasks/systemd.yml index 56a5898..a2b9e4b 100644 --- a/roles/fedora/tasks/systemd.yml +++ b/roles/fedora/tasks/systemd.yml @@ -1,5 +1,7 @@ --- - name: Configure systemd system.conf + vars: + systemd_conf: '{{ systemd_conf_default|combine(systemd_conf_role) }}' ini_file: path: '/etc/systemd/system.conf' no_extra_spaces: yes @@ -10,6 +12,8 @@ with_dict: '{{ systemd_conf }}' - name: Configure journald.conf + vars: + journald_conf: '{{ journald_conf_default|combine(journald_conf_role) }}' ini_file: path: '/etc/systemd/journald.conf' no_extra_spaces: yes @@ -20,6 +24,8 @@ with_dict: '{{ journald_conf }}' - name: Configure logind.conf + vars: + logind_conf: '{{ logind_conf_default|combine(logind_conf_role) }}' ini_file: path: '/etc/systemd/logind.conf' no_extra_spaces: yes diff --git a/roles/fedora/tasks/timesyncd.yml b/roles/fedora/tasks/timesyncd.yml index 180d8c2..9895d0b 100644 --- a/roles/fedora/tasks/timesyncd.yml +++ b/roles/fedora/tasks/timesyncd.yml @@ -1,5 +1,7 @@ --- -- name: Configure systemd-timesyncd +- name: Configure timesyncd.conf + vars: + timesyncd_conf: '{{ timesyncd_conf_default|combine(timesyncd_conf_role) }}' ini_file: path: '/etc/systemd/timesyncd.conf' no_extra_spaces: yes diff --git a/roles/fedora/templates/locale.conf.j2 b/roles/fedora/templates/locale.conf.j2 index cad9883..0e972d4 100644 --- a/roles/fedora/templates/locale.conf.j2 +++ b/roles/fedora/templates/locale.conf.j2 @@ -1,3 +1,3 @@ -{% for key, value in locale.default|dictsort(true) %} +{% for key, value in locale_default|dictsort(true) %} {{ key }}={{ value }} {% endfor %} |