aboutsummaryrefslogtreecommitdiffstats
path: root/roles/debian/tasks
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2020-02-27 20:01:17 +0100
committerEmil Renner Berthing <esmil@labitat.dk>2020-02-27 20:01:43 +0100
commitecb6482396c969c6e0eb3e06c182c7bfb91d54fe (patch)
treef9f96c899fb9a6dd09eff524e91574a6206ea29c /roles/debian/tasks
parent199f459ea883aa0f375ff0a22079969b60e7ca62 (diff)
downloadlabitat-ansible-ecb6482396c969c6e0eb3e06c182c7bfb91d54fe.tar.gz
labitat-ansible-ecb6482396c969c6e0eb3e06c182c7bfb91d54fe.tar.xz
labitat-ansible-ecb6482396c969c6e0eb3e06c182c7bfb91d54fe.zip
roles: remove useless |bool filters
This used to be a fix for some bogus warnings, but they seem to have gone in recent versions of Ansible
Diffstat (limited to 'roles/debian/tasks')
-rw-r--r--roles/debian/tasks/hostname.yml2
-rw-r--r--roles/debian/tasks/main.yml2
-rw-r--r--roles/debian/tasks/networkd.yml8
-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
7 files changed, 13 insertions, 13 deletions
diff --git a/roles/debian/tasks/hostname.yml b/roles/debian/tasks/hostname.yml
index 214f243..6709c03 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|bool
+ when: chroot
# vim: set ts=2 sw=2 et:
diff --git a/roles/debian/tasks/main.yml b/roles/debian/tasks/main.yml
index 407040e..71637c1 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|bool
+ when: use_tmpfs
- 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 49b3041..bed76a0 100644
--- a/roles/debian/tasks/networkd.yml
+++ b/roles/debian/tasks/networkd.yml
@@ -10,7 +10,7 @@
value: "{{ (item.value is string)|ternary(item.value,omit) }}"
state: "{{ (item.value is string)|ternary('present','absent') }}"
with_dict: '{{ networkd_conf }}'
- when: use_networkd|bool
+ when: use_networkd
- name: Enable/disable systemd-networkd
systemd:
@@ -23,7 +23,7 @@
when: not chroot
- name: '- when in chroot'
command: "systemctl {{ use_networkd|ternary('enable','disable') }} systemd-networkd.service"
- when: chroot|bool
+ when: chroot
# in Debian 9 (stretch) we need to enable this manually
# this is fixed in buster though
@@ -35,7 +35,7 @@
when: apt_release|default(ansible_distribution_release) == 'stretch' and not chroot
- name: '- when in chroot'
command: "systemctl {{ use_networkd|ternary('enable','disable') }} systemd-networkd-wait-online.service"
- when: apt_release|default(ansible_distribution_release) == 'stretch' and chroot|bool
+ when: apt_release|default(ansible_distribution_release) == 'stretch' and chroot
# use RequiredForOnline in systemd.network files if possible,
# but for older systemd's set networkd_ignore: ['eth0', 'eth1']
@@ -66,6 +66,6 @@
block:
- command: systemctl disable networking.service
- command: systemctl mask networking.service
- when: use_networkd|bool and chroot|bool
+ when: use_networkd 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 9b8d589..35c2cf6 100644
--- a/roles/debian/tasks/resolved.yml
+++ b/roles/debian/tasks/resolved.yml
@@ -10,7 +10,7 @@
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
+ when: use_resolved
notify: restart resolved
- name: Enable/disable systemd-resolved
@@ -22,7 +22,7 @@
when: not chroot
- name: '- when in chroot'
command: "systemctl {{ use_resolved|ternary('enable','disable') }} systemd-resolved.service"
- when: chroot|bool
+ when: chroot
- name: Symlink /etc/resolv.conf
file:
@@ -30,12 +30,12 @@
src: '/run/systemd/resolve/resolv.conf'
state: link
force: yes
- when: use_resolved|bool
+ when: use_resolved
- 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|bool
+ when: use_resolved
# vim: set ts=2 sw=2 et:
diff --git a/roles/debian/tasks/sshd.yml b/roles/debian/tasks/sshd.yml
index 03f3279..4e06efe 100644
--- a/roles/debian/tasks/sshd.yml
+++ b/roles/debian/tasks/sshd.yml
@@ -46,6 +46,6 @@
when: not chroot
- name: '- when in chroot'
command: systemctl enable ssh.service
- when: chroot|bool
+ when: chroot
# vim: set ts=2 sw=2 et:
diff --git a/roles/debian/tasks/timesyncd.yml b/roles/debian/tasks/timesyncd.yml
index 17693c3..8b53cab 100644
--- a/roles/debian/tasks/timesyncd.yml
+++ b/roles/debian/tasks/timesyncd.yml
@@ -22,6 +22,6 @@
when: not chroot
- name: '- when in chroot'
command: systemctl enable systemd-timesyncd.service
- when: chroot|bool
+ when: chroot
# vim: set ts=2 sw=2 et:
diff --git a/roles/debian/tasks/timezone.yml b/roles/debian/tasks/timezone.yml
index efe6546..a917dd4 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|bool
+ when: chroot
# vim: set ts=2 sw=2 et: