Fix hostname if run with --check

This commit is contained in:
Daniel A. Maierhofer
2018-07-26 14:40:04 +02:00
parent 9c065bf40d
commit 4bae699c84

View File

@@ -13,6 +13,7 @@
- name: set hostname for void - name: set hostname for void
command: hostname "{{ inventory_hostname_short }}" command: hostname "{{ inventory_hostname_short }}"
when: ansible_os_family != "Debian" and hostname.stdout != inventory_hostname_short when: ansible_os_family != "Debian" and hostname.stdout != inventory_hostname_short
ignore_errors: yes
- name: /etc/hostname - name: /etc/hostname
copy: copy: