aboutsummaryrefslogtreecommitdiffstats
path: root/roles/fedora
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2018-09-21 23:43:50 +0200
committerEmil Renner Berthing <esmil@labitat.dk>2018-09-21 23:43:50 +0200
commit09763679131a9c4bfd8d3b891f589b44d42a3657 (patch)
treedc1e531f7886c9012c6a7c9939055115a21da159 /roles/fedora
parent17b400336cdb3886bc3fd95606de381e0a632097 (diff)
downloadlabitat-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/fedora')
-rw-r--r--roles/fedora/tasks/hostname.yml6
1 files changed, 3 insertions, 3 deletions
diff --git a/roles/fedora/tasks/hostname.yml b/roles/fedora/tasks/hostname.yml
index 5299270..2e755ca 100644
--- a/roles/fedora/tasks/hostname.yml
+++ b/roles/fedora/tasks/hostname.yml
@@ -2,11 +2,11 @@
- name: Set hostname
hostname:
name: '{{ hostname }}'
- when: "'container' not in ansible_env"
-- name: '- when in nspawn'
+ when: not chroot
+- name: '- when in chroot'
copy:
dest: /etc/hostname
content: "{{ hostname }}\n"
- when: "'container' in ansible_env"
+ when: chroot
# vim: set ts=2 sw=2 et: