net-base: Don't set the host name inside of LXC containers
authorAlexander Barton <alex@barton.de>
Fri, 20 Jul 2018 14:07:19 +0000 (16:07 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 20 Jul 2018 14:07:19 +0000 (16:07 +0200)
roles/net-base/tasks/main.yml

index 34eab7a..16a4172 100644 (file)
@@ -7,4 +7,4 @@
     - hostname
   hostname: >
     name="{{ inventory_hostname_short }}"
-  when: "ansible_distribution != 'OpenBSD'"
+  when: "ansible_distribution != 'OpenBSD' and ansible_virtualization_type != 'lxc'"