aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2020-02-27 18:48:05 +0100
committerEmil Renner Berthing <esmil@labitat.dk>2020-02-27 18:48:05 +0100
commit5000a055cad37ea840609120cb9fa5765e238701 (patch)
treea569df1cd6141a558adb8b1f155aeca402be50bb
parent6abfd1e88722326480192f49833ddceaf29f5498 (diff)
downloadlabitat-ansible-5000a055cad37ea840609120cb9fa5765e238701.tar.gz
labitat-ansible-5000a055cad37ea840609120cb9fa5765e238701.tar.xz
labitat-ansible-5000a055cad37ea840609120cb9fa5765e238701.zip
fedora: allow empty strings in ini files
-rw-r--r--roles/fedora/tasks/resolved.yml4
-rw-r--r--roles/fedora/tasks/systemd.yml12
-rw-r--r--roles/fedora/tasks/timesyncd.yml4
3 files changed, 10 insertions, 10 deletions
diff --git a/roles/fedora/tasks/resolved.yml b/roles/fedora/tasks/resolved.yml
index 4fcc34b..9b8d589 100644
--- a/roles/fedora/tasks/resolved.yml
+++ b/roles/fedora/tasks/resolved.yml
@@ -7,8 +7,8 @@
no_extra_spaces: yes
section: "{{ item.key.split('.',1)[0] }}"
option: "{{ item.key.split('.',1)[1] }}"
- value: "{{ item.value|ternary(item.value,omit) }}"
- state: "{{ item.value|ternary('present','absent') }}"
+ value: "{{ (item.value is string)|ternary(item.value,omit) }}"
+ state: "{{ (item.value is string)|ternary('present','absent') }}"
with_dict: '{{ resolved_conf }}'
when: use_resolved|bool
notify: restart resolved
diff --git a/roles/fedora/tasks/systemd.yml b/roles/fedora/tasks/systemd.yml
index a2b9e4b..5413266 100644
--- a/roles/fedora/tasks/systemd.yml
+++ b/roles/fedora/tasks/systemd.yml
@@ -7,8 +7,8 @@
no_extra_spaces: yes
section: "{{ item.key.split('.',1)[0] }}"
option: "{{ item.key.split('.',1)[1] }}"
- value: "{{ item.value|ternary(item.value,omit) }}"
- state: "{{ item.value|ternary('present','absent') }}"
+ value: "{{ (item.value is string)|ternary(item.value,omit) }}"
+ state: "{{ (item.value is string)|ternary('present','absent') }}"
with_dict: '{{ systemd_conf }}'
- name: Configure journald.conf
@@ -19,8 +19,8 @@
no_extra_spaces: yes
section: "{{ item.key.split('.',1)[0] }}"
option: "{{ item.key.split('.',1)[1] }}"
- value: "{{ item.value|ternary(item.value,omit) }}"
- state: "{{ item.value|ternary('present','absent') }}"
+ value: "{{ (item.value is string)|ternary(item.value,omit) }}"
+ state: "{{ (item.value is string)|ternary('present','absent') }}"
with_dict: '{{ journald_conf }}'
- name: Configure logind.conf
@@ -31,8 +31,8 @@
no_extra_spaces: yes
section: "{{ item.key.split('.',1)[0] }}"
option: "{{ item.key.split('.',1)[1] }}"
- value: "{{ item.value|ternary(item.value,omit) }}"
- state: "{{ item.value|ternary('present','absent') }}"
+ value: "{{ (item.value is string)|ternary(item.value,omit) }}"
+ state: "{{ (item.value is string)|ternary('present','absent') }}"
with_dict: '{{ logind_conf }}'
# vim: set ts=2 sw=2 et:
diff --git a/roles/fedora/tasks/timesyncd.yml b/roles/fedora/tasks/timesyncd.yml
index 9895d0b..17693c3 100644
--- a/roles/fedora/tasks/timesyncd.yml
+++ b/roles/fedora/tasks/timesyncd.yml
@@ -7,8 +7,8 @@
no_extra_spaces: yes
section: "{{ item.key.split('.',1)[0] }}"
option: "{{ item.key.split('.',1)[1] }}"
- value: "{{ item.value|ternary(item.value,omit) }}"
- state: "{{ item.value|ternary('present','absent') }}"
+ value: "{{ (item.value is string)|ternary(item.value,omit) }}"
+ state: "{{ (item.value is string)|ternary('present','absent') }}"
with_dict: '{{ timesyncd_conf }}'
when: use_timesyncd
notify: restart timesyncd