aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2019-07-06 14:43:04 +0200
committerEmil Renner Berthing <esmil@labitat.dk>2019-07-06 14:56:06 +0200
commit4f29dbb2b82f0c29bdb385741ac1852550c1e210 (patch)
tree0f69220d1a1208527e39826b8208cc7f72081b03 /roles
parentfe81c24477abd25f218dde33ff6e23616a90330f (diff)
downloadlabitat-ansible-4f29dbb2b82f0c29bdb385741ac1852550c1e210.tar.gz
labitat-ansible-4f29dbb2b82f0c29bdb385741ac1852550c1e210.tar.xz
labitat-ansible-4f29dbb2b82f0c29bdb385741ac1852550c1e210.zip
roles: fix warnings about bare boolean variables
Diffstat (limited to 'roles')
-rw-r--r--roles/debian/tasks/hostname.yml2
-rw-r--r--roles/debian/tasks/main.yml2
-rw-r--r--roles/debian/tasks/networkd.yml6
-rw-r--r--roles/debian/tasks/resolved.yml8
-rw-r--r--roles/debian/tasks/sshd.yml2
-rw-r--r--roles/debian/tasks/timesyncd.yml2
-rw-r--r--roles/debian/tasks/timezone.yml2
-rw-r--r--roles/fedora/tasks/dnf.yml2
-rw-r--r--roles/fedora/tasks/hostname.yml2
-rw-r--r--roles/fedora/tasks/networkd.yml2
-rw-r--r--roles/fedora/tasks/resolved.yml8
-rw-r--r--roles/fedora/tasks/timesyncd.yml2
-rw-r--r--roles/fedora/tasks/timezone.yml2
-rw-r--r--roles/jumbotron/tasks/console.yml2
-rw-r--r--roles/raspbian/tasks/apt.yml2
-rw-r--r--roles/raspbian/tasks/networkd.yml2
-rw-r--r--roles/space_server/tasks/avahi.yml2
-rw-r--r--roles/space_server/tasks/bird.yml2
-rw-r--r--roles/space_server/tasks/dhcpd.yml2
-rw-r--r--roles/space_server/tasks/gettys.yml4
-rw-r--r--roles/space_server/tasks/named.yml4
-rw-r--r--roles/space_server/tasks/nftables.yml2
-rw-r--r--roles/space_server/tasks/radius.yml4
-rw-r--r--roles/space_server/tasks/sshd.yml2
24 files changed, 35 insertions, 35 deletions
diff --git a/roles/debian/tasks/hostname.yml b/roles/debian/tasks/hostname.yml
index 6709c03..214f243 100644
--- a/roles/debian/tasks/hostname.yml
+++ b/roles/debian/tasks/hostname.yml
@@ -10,6 +10,6 @@
owner: root
group: root
mode: 0644
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/debian/tasks/main.yml b/roles/debian/tasks/main.yml
index 71637c1..407040e 100644
--- a/roles/debian/tasks/main.yml
+++ b/roles/debian/tasks/main.yml
@@ -3,7 +3,7 @@
tags: apt
- import_tasks: tmpfs.yml
tags: tmpfs
- when: use_tmpfs
+ when: use_tmpfs|bool
- import_tasks: hosts.yml
tags: hosts
- import_tasks: timezone.yml
diff --git a/roles/debian/tasks/networkd.yml b/roles/debian/tasks/networkd.yml
index 967dace..3ad37df 100644
--- a/roles/debian/tasks/networkd.yml
+++ b/roles/debian/tasks/networkd.yml
@@ -10,7 +10,7 @@
when: not chroot
- name: '- when in chroot'
command: "systemctl {{ use_networkd|ternary('enable','disable') }} systemd-networkd.service"
- when: chroot
+ when: chroot|bool
# in Debian 9 (stretch) we need to enable this manually
# this is fixed in buster though
@@ -22,7 +22,7 @@
when: ansible_distribution_release == 'stretch' and not chroot
- name: '- when in chroot'
command: "systemctl {{ use_networkd|ternary('enable','disable') }} systemd-networkd-wait-online.service"
- when: ansible_distribution_release == 'stretch' and chroot
+ when: ansible_distribution_release == 'stretch' and chroot|bool
# use RequiredForOnline in systemd.network files if possible,
# but for older systemd's set networkd_ignore: ['eth0', 'eth1']
@@ -53,6 +53,6 @@
block:
- command: systemctl disable networking.service
- command: systemctl mask networking.service
- when: use_networkd and chroot
+ when: use_networkd|bool and chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/debian/tasks/resolved.yml b/roles/debian/tasks/resolved.yml
index 0190c77..9a6d4c1 100644
--- a/roles/debian/tasks/resolved.yml
+++ b/roles/debian/tasks/resolved.yml
@@ -8,7 +8,7 @@
value: "{{ item.value|ternary(item.value,omit) }}"
state: "{{ item.value|ternary('present','absent') }}"
with_dict: '{{ resolved_conf }}'
- when: use_resolved
+ when: use_resolved|bool
notify: restart resolved
- name: Enable/disable systemd-resolved
@@ -20,7 +20,7 @@
when: not chroot
- name: '- when in chroot'
command: "systemctl {{ use_resolved|ternary('enable','disable') }} systemd-resolved.service"
- when: chroot
+ when: chroot|bool
- name: Symlink /etc/resolv.conf
file:
@@ -28,12 +28,12 @@
src: '/run/systemd/resolve/resolv.conf'
state: link
force: yes
- when: use_resolved
+ when: use_resolved|bool
- name: Use myhostname and possibly resolved nss plugins
lineinfile:
path: /etc/nsswitch.conf
regexp: '^hosts:'
line: 'hosts: files resolve [!UNAVAIL=return] dns myhostname'
- when: use_resolved
+ when: use_resolved|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/debian/tasks/sshd.yml b/roles/debian/tasks/sshd.yml
index a0a2d96..62aa1cc 100644
--- a/roles/debian/tasks/sshd.yml
+++ b/roles/debian/tasks/sshd.yml
@@ -51,6 +51,6 @@
when: not chroot
- name: '- when in chroot'
command: systemctl enable ssh.service
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/debian/tasks/timesyncd.yml b/roles/debian/tasks/timesyncd.yml
index 63949fc..180d8c2 100644
--- a/roles/debian/tasks/timesyncd.yml
+++ b/roles/debian/tasks/timesyncd.yml
@@ -20,6 +20,6 @@
when: not chroot
- name: '- when in chroot'
command: systemctl enable systemd-timesyncd.service
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/debian/tasks/timezone.yml b/roles/debian/tasks/timezone.yml
index a917dd4..efe6546 100644
--- a/roles/debian/tasks/timezone.yml
+++ b/roles/debian/tasks/timezone.yml
@@ -9,6 +9,6 @@
src: '../usr/share/zoneinfo/{{ timezone }}'
state: link
force: yes
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/fedora/tasks/dnf.yml b/roles/fedora/tasks/dnf.yml
index e1c621f..aa0207e 100644
--- a/roles/fedora/tasks/dnf.yml
+++ b/roles/fedora/tasks/dnf.yml
@@ -41,6 +41,6 @@
when: not chroot
- name: '- when in chroot'
command: "systemctl {{ dnf_makecache|ternary('enable','disable') }} dnf-makecache.timer"
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/fedora/tasks/hostname.yml b/roles/fedora/tasks/hostname.yml
index 6709c03..214f243 100644
--- a/roles/fedora/tasks/hostname.yml
+++ b/roles/fedora/tasks/hostname.yml
@@ -10,6 +10,6 @@
owner: root
group: root
mode: 0644
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/fedora/tasks/networkd.yml b/roles/fedora/tasks/networkd.yml
index de38fa4..d643233 100644
--- a/roles/fedora/tasks/networkd.yml
+++ b/roles/fedora/tasks/networkd.yml
@@ -10,6 +10,6 @@
when: not chroot
- name: '- when in chroot'
command: "systemctl {{ use_networkd|ternary('enable','disable') }} systemd-networkd.service"
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/fedora/tasks/resolved.yml b/roles/fedora/tasks/resolved.yml
index 0190c77..9a6d4c1 100644
--- a/roles/fedora/tasks/resolved.yml
+++ b/roles/fedora/tasks/resolved.yml
@@ -8,7 +8,7 @@
value: "{{ item.value|ternary(item.value,omit) }}"
state: "{{ item.value|ternary('present','absent') }}"
with_dict: '{{ resolved_conf }}'
- when: use_resolved
+ when: use_resolved|bool
notify: restart resolved
- name: Enable/disable systemd-resolved
@@ -20,7 +20,7 @@
when: not chroot
- name: '- when in chroot'
command: "systemctl {{ use_resolved|ternary('enable','disable') }} systemd-resolved.service"
- when: chroot
+ when: chroot|bool
- name: Symlink /etc/resolv.conf
file:
@@ -28,12 +28,12 @@
src: '/run/systemd/resolve/resolv.conf'
state: link
force: yes
- when: use_resolved
+ when: use_resolved|bool
- name: Use myhostname and possibly resolved nss plugins
lineinfile:
path: /etc/nsswitch.conf
regexp: '^hosts:'
line: 'hosts: files resolve [!UNAVAIL=return] dns myhostname'
- when: use_resolved
+ when: use_resolved|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/fedora/tasks/timesyncd.yml b/roles/fedora/tasks/timesyncd.yml
index 63949fc..180d8c2 100644
--- a/roles/fedora/tasks/timesyncd.yml
+++ b/roles/fedora/tasks/timesyncd.yml
@@ -20,6 +20,6 @@
when: not chroot
- name: '- when in chroot'
command: systemctl enable systemd-timesyncd.service
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/fedora/tasks/timezone.yml b/roles/fedora/tasks/timezone.yml
index a917dd4..efe6546 100644
--- a/roles/fedora/tasks/timezone.yml
+++ b/roles/fedora/tasks/timezone.yml
@@ -9,6 +9,6 @@
src: '../usr/share/zoneinfo/{{ timezone }}'
state: link
force: yes
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/jumbotron/tasks/console.yml b/roles/jumbotron/tasks/console.yml
index 42ec011..8cbd190 100644
--- a/roles/jumbotron/tasks/console.yml
+++ b/roles/jumbotron/tasks/console.yml
@@ -41,6 +41,6 @@
when: not chroot
- name: '- when in chroot'
command: systemctl enable console-setup.service
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/raspbian/tasks/apt.yml b/roles/raspbian/tasks/apt.yml
index 2d88800..f9a4115 100644
--- a/roles/raspbian/tasks/apt.yml
+++ b/roles/raspbian/tasks/apt.yml
@@ -13,6 +13,6 @@
with_items:
- apt-daily.timer
- apt-daily-upgrade.timer
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/raspbian/tasks/networkd.yml b/roles/raspbian/tasks/networkd.yml
index bfff12d..c372a5c 100644
--- a/roles/raspbian/tasks/networkd.yml
+++ b/roles/raspbian/tasks/networkd.yml
@@ -3,6 +3,6 @@
file:
path: '/etc/systemd/system/dhcpcd.service.d'
state: absent
- when: use_networkd
+ when: use_networkd|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/space_server/tasks/avahi.yml b/roles/space_server/tasks/avahi.yml
index 2e715bb..4dd4e74 100644
--- a/roles/space_server/tasks/avahi.yml
+++ b/roles/space_server/tasks/avahi.yml
@@ -85,7 +85,7 @@
command: systemctl enable avahi-daemon.service
args:
creates: '/etc/systemd/system/multi-user.target.wants/avahi-daemon.service'
- when: chroot
+ when: chroot|bool
- name: Use nss-mdns
lineinfile:
diff --git a/roles/space_server/tasks/bird.yml b/roles/space_server/tasks/bird.yml
index a5cd85a..3687910 100644
--- a/roles/space_server/tasks/bird.yml
+++ b/roles/space_server/tasks/bird.yml
@@ -61,6 +61,6 @@
with_items:
- bird
- bird6
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/space_server/tasks/dhcpd.yml b/roles/space_server/tasks/dhcpd.yml
index 79d2f0f..e591a85 100644
--- a/roles/space_server/tasks/dhcpd.yml
+++ b/roles/space_server/tasks/dhcpd.yml
@@ -20,6 +20,6 @@
command: systemctl enable dhcpd.service
args:
creates: '/etc/systemd/system/multi-user.target.wants/dhcpd.service'
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/space_server/tasks/gettys.yml b/roles/space_server/tasks/gettys.yml
index ea351f4..2d2511a 100644
--- a/roles/space_server/tasks/gettys.yml
+++ b/roles/space_server/tasks/gettys.yml
@@ -9,7 +9,7 @@
command: systemctl disable getty@tty1.service
args:
removes: '/etc/systemd/system/getty.target.wants/getty@tty1.service'
- when: chroot
+ when: chroot|bool
- name: Enable serial-getty@ttyS0
systemd:
@@ -20,6 +20,6 @@
command: systemctl enable serial-getty@ttyS0.service
args:
creates: '/etc/systemd/system/getty.target.wants/serial-getty@ttyS0.service'
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/space_server/tasks/named.yml b/roles/space_server/tasks/named.yml
index 519b5d4..30ab544 100644
--- a/roles/space_server/tasks/named.yml
+++ b/roles/space_server/tasks/named.yml
@@ -63,9 +63,9 @@
masked: no
state: started
when: not chroot
-- name: '- when in nspawn'
+- name: '- when in chroot'
command: systemctl enable named.service
- when: chroot
+ when: chroot|bool
- name: Use our own resolver
copy:
diff --git a/roles/space_server/tasks/nftables.yml b/roles/space_server/tasks/nftables.yml
index 9c56714..67d0864 100644
--- a/roles/space_server/tasks/nftables.yml
+++ b/roles/space_server/tasks/nftables.yml
@@ -37,6 +37,6 @@
command: systemctl enable nftables.service
args:
creates: '/etc/systemd/system/multi-user.target.wants/nftables.service'
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/space_server/tasks/radius.yml b/roles/space_server/tasks/radius.yml
index a3f4183..f918052 100644
--- a/roles/space_server/tasks/radius.yml
+++ b/roles/space_server/tasks/radius.yml
@@ -98,7 +98,7 @@
command: systemctl enable getusers.timer
args:
creates: '/etc/systemd/system/timers.target.wants/getusers.timer'
- when: chroot
+ when: chroot|bool
- name: Create service drop-in directory
file:
@@ -127,6 +127,6 @@
command: systemctl enable radiusd.service
args:
creates: '/etc/systemd/system/multi-user.target.wants/radiusd.service'
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et:
diff --git a/roles/space_server/tasks/sshd.yml b/roles/space_server/tasks/sshd.yml
index 2f8d35a..14597b4 100644
--- a/roles/space_server/tasks/sshd.yml
+++ b/roles/space_server/tasks/sshd.yml
@@ -49,6 +49,6 @@
command: systemctl enable sshd.service
args:
creates: '/etc/systemd/system/multi-user.target.wants/sshd.service'
- when: chroot
+ when: chroot|bool
# vim: set ts=2 sw=2 et: