Fix hostname, iptables, openssh-sftp an xbps

This commit is contained in:
Daniel A. Maierhofer
2018-07-26 12:28:49 +02:00
parent e347803f62
commit 9c065bf40d
6 changed files with 37 additions and 3 deletions

View File

@@ -1,8 +1,18 @@
---
- name: set hostname
- name: set hostname for debian
hostname:
name: "{{ inventory_hostname_short }}"
ignore_errors: yes
when: ansible_os_family == "Debian"
- name: check hostname for void
command: hostname
register: hostname
when: ansible_os_family != "Debian"
changed_when: False
- name: set hostname for void
command: hostname "{{ inventory_hostname_short }}"
when: ansible_os_family != "Debian" and hostname.stdout != inventory_hostname_short
- name: /etc/hostname
copy: