diff options
author | Emil Renner Berthing <esmil@labitat.dk> | 2018-09-21 23:43:50 +0200 |
---|---|---|
committer | Emil Renner Berthing <esmil@labitat.dk> | 2018-09-21 23:43:50 +0200 |
commit | 09763679131a9c4bfd8d3b891f589b44d42a3657 (patch) | |
tree | dc1e531f7886c9012c6a7c9939055115a21da159 /roles/space_server/tasks | |
parent | 17b400336cdb3886bc3fd95606de381e0a632097 (diff) | |
download | labitat-ansible-09763679131a9c4bfd8d3b891f589b44d42a3657.tar.gz labitat-ansible-09763679131a9c4bfd8d3b891f589b44d42a3657.tar.xz labitat-ansible-09763679131a9c4bfd8d3b891f589b44d42a3657.zip |
Use one variable for chroot or nspawn environment
Diffstat (limited to 'roles/space_server/tasks')
-rw-r--r-- | roles/space_server/tasks/avahi.yml | 6 | ||||
-rw-r--r-- | roles/space_server/tasks/bird.yml | 6 | ||||
-rw-r--r-- | roles/space_server/tasks/blackhole.yml | 6 | ||||
-rw-r--r-- | roles/space_server/tasks/dhcpd.yml | 6 | ||||
-rw-r--r-- | roles/space_server/tasks/gettys.yml | 12 | ||||
-rw-r--r-- | roles/space_server/tasks/networkd.yml | 6 | ||||
-rw-r--r-- | roles/space_server/tasks/nftables.yml | 6 | ||||
-rw-r--r-- | roles/space_server/tasks/radius.yml | 12 | ||||
-rw-r--r-- | roles/space_server/tasks/radvd.yml | 6 | ||||
-rw-r--r-- | roles/space_server/tasks/resolved.yml | 12 | ||||
-rw-r--r-- | roles/space_server/tasks/sshd.yml | 6 | ||||
-rw-r--r-- | roles/space_server/tasks/timesyncd.yml | 6 | ||||
-rw-r--r-- | roles/space_server/tasks/unbound.yml | 6 |
13 files changed, 48 insertions, 48 deletions
diff --git a/roles/space_server/tasks/avahi.yml b/roles/space_server/tasks/avahi.yml index db8a5ee..1ed1e7c 100644 --- a/roles/space_server/tasks/avahi.yml +++ b/roles/space_server/tasks/avahi.yml @@ -93,12 +93,12 @@ enabled: yes masked: no state: started - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable avahi-daemon.service args: creates: '/etc/systemd/system/multi-user.target.wants/avahi-daemon.service' - when: "'container' in ansible_env" + when: chroot - name: Use nss-mdns lineinfile: diff --git a/roles/space_server/tasks/bird.yml b/roles/space_server/tasks/bird.yml index 17f0a99..8f4e20b 100644 --- a/roles/space_server/tasks/bird.yml +++ b/roles/space_server/tasks/bird.yml @@ -55,14 +55,14 @@ with_items: - bird - bird6 - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: 'systemctl enable {{ item }}.service' args: creates: '/etc/systemd/system/multi-user.target.wants/{{ item }}.service' with_items: - bird - bird6 - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: diff --git a/roles/space_server/tasks/blackhole.yml b/roles/space_server/tasks/blackhole.yml index b62a7ca..2fd1b5e 100644 --- a/roles/space_server/tasks/blackhole.yml +++ b/roles/space_server/tasks/blackhole.yml @@ -22,11 +22,11 @@ enabled: yes masked: no state: started - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable blackhole.service args: creates: '/etc/systemd/system/multi-user.target.wants/blackhole.service' - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: diff --git a/roles/space_server/tasks/dhcpd.yml b/roles/space_server/tasks/dhcpd.yml index a15ce49..53ad1a6 100644 --- a/roles/space_server/tasks/dhcpd.yml +++ b/roles/space_server/tasks/dhcpd.yml @@ -21,11 +21,11 @@ enabled: yes masked: no state: started - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable dhcpd.service args: creates: '/etc/systemd/system/multi-user.target.wants/dhcpd.service' - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: diff --git a/roles/space_server/tasks/gettys.yml b/roles/space_server/tasks/gettys.yml index bdf293a..ea351f4 100644 --- a/roles/space_server/tasks/gettys.yml +++ b/roles/space_server/tasks/gettys.yml @@ -4,22 +4,22 @@ name: getty@tty1.service enabled: no state: stopped - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl disable getty@tty1.service args: removes: '/etc/systemd/system/getty.target.wants/getty@tty1.service' - when: "'container' in ansible_env" + when: chroot - name: Enable serial-getty@ttyS0 systemd: name: serial-getty@ttyS0.service enabled: yes - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable serial-getty@ttyS0.service args: creates: '/etc/systemd/system/getty.target.wants/serial-getty@ttyS0.service' - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: diff --git a/roles/space_server/tasks/networkd.yml b/roles/space_server/tasks/networkd.yml index ecd5d52..b46b728 100644 --- a/roles/space_server/tasks/networkd.yml +++ b/roles/space_server/tasks/networkd.yml @@ -40,11 +40,11 @@ enabled: yes masked: no state: started - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable systemd-networkd.service args: creates: '/etc/systemd/system/multi-user.target.wants/systemd-networkd.service' - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: diff --git a/roles/space_server/tasks/nftables.yml b/roles/space_server/tasks/nftables.yml index 2dc8fce..ac5e441 100644 --- a/roles/space_server/tasks/nftables.yml +++ b/roles/space_server/tasks/nftables.yml @@ -32,11 +32,11 @@ enabled: yes masked: no state: started - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable nftables.service args: creates: '/etc/systemd/system/multi-user.target.wants/nftables.service' - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: diff --git a/roles/space_server/tasks/radius.yml b/roles/space_server/tasks/radius.yml index b480d3f..11ab1b0 100644 --- a/roles/space_server/tasks/radius.yml +++ b/roles/space_server/tasks/radius.yml @@ -89,12 +89,12 @@ enabled: yes masked: no state: started - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable getusers.timer args: creates: '/etc/systemd/system/timers.target.wants/getusers.timer' - when: "'container' in ansible_env" + when: chroot - name: Create service drop-in directory file: @@ -111,11 +111,11 @@ enabled: yes masked: no state: started - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable radiusd.service args: creates: '/etc/systemd/system/multi-user.target.wants/radiusd.service' - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: diff --git a/roles/space_server/tasks/radvd.yml b/roles/space_server/tasks/radvd.yml index 3c25c5c..ec1be83 100644 --- a/roles/space_server/tasks/radvd.yml +++ b/roles/space_server/tasks/radvd.yml @@ -30,11 +30,11 @@ enabled: yes masked: no state: started - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable radvd.service args: creates: '/etc/systemd/system/multi-user.target.wants/radvd.service' - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: diff --git a/roles/space_server/tasks/resolved.yml b/roles/space_server/tasks/resolved.yml index d95d1d1..9196e1c 100644 --- a/roles/space_server/tasks/resolved.yml +++ b/roles/space_server/tasks/resolved.yml @@ -5,12 +5,12 @@ # enabled: yes # masked: no # state: started -# when: "'container' not in ansible_env" -#- name: '- when in nspawn' +# when: not chroot +#- name: '- when in chroot' # command: systemctl enable systemd-resolved.service # args: # creates: '/etc/systemd/system/multi-user.target.wants/systemd-resolved.service' -# when: "'container' in ansible_env" +# when: chroot # #- name: Use systemd-resolved # lineinfile: @@ -24,11 +24,11 @@ enabled: no masked: no state: stopped - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl disable systemd-resolved.service args: removes: '/etc/systemd/system/multi-user.target.wants/systemd-resolved.service' - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: diff --git a/roles/space_server/tasks/sshd.yml b/roles/space_server/tasks/sshd.yml index cc8a232..112f817 100644 --- a/roles/space_server/tasks/sshd.yml +++ b/roles/space_server/tasks/sshd.yml @@ -27,11 +27,11 @@ enabled: yes masked: no state: started - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable sshd.service args: creates: '/etc/systemd/system/multi-user.target.wants/sshd.service' - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: diff --git a/roles/space_server/tasks/timesyncd.yml b/roles/space_server/tasks/timesyncd.yml index cf964e3..3217889 100644 --- a/roles/space_server/tasks/timesyncd.yml +++ b/roles/space_server/tasks/timesyncd.yml @@ -5,11 +5,11 @@ enabled: yes masked: no state: started - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable systemd-timesyncd.service args: creates: '/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service' - when: "'container' in ansible_env" + when: chroot # vim: set ts=2 sw=2 et: diff --git a/roles/space_server/tasks/unbound.yml b/roles/space_server/tasks/unbound.yml index a9c4610..b11c338 100644 --- a/roles/space_server/tasks/unbound.yml +++ b/roles/space_server/tasks/unbound.yml @@ -21,12 +21,12 @@ enabled: yes masked: no state: started - when: "'container' not in ansible_env" -- name: '- when in nspawn' + when: not chroot +- name: '- when in chroot' command: systemctl enable unbound.service args: creates: '/etc/systemd/system/multi-user.target.wants/unbound.service' - when: "'container' in ansible_env" + when: chroot - name: Use our own resolver copy: |