small cleanup

This commit is contained in:
Robert Kaussow 2018-06-24 14:43:53 +02:00
parent d736545169
commit d2e52dd958
2 changed files with 13 additions and 14 deletions

View File

@ -1,8 +1,7 @@
---
network_hostname: ''
network_fqdn: ''
network_defaultif: ''
network_hostname: localhost
network_fqdn: localdomain
network_defaultif: eth0
network_disable_ipv6: false
network_dns_server: '8.8.8.8'
network_dns_server: 8.8.8.8
network_interfaces: {}

View File

@ -1,8 +1,8 @@
---
- name: Set hostname
template:
src: 'etc/hostname.j2'
dest: '/etc/hostname'
src: etc/hostname.j2
dest: /etc/hostname
owner: root
group: root
mode: 0644
@ -12,8 +12,8 @@
- name: Set hosts file
template:
src: 'etc/hosts.j2'
dest: '/etc/hosts'
src: etc/hosts.j2
dest: /etc/hosts
owner: root
group: root
mode: 0644
@ -23,12 +23,12 @@
- name: Add network interface configuration
template:
src: 'etc/sysconfig/network-scrips/ifcfg.j2'
dest: '/etc/sysconfig/network-scripts/ifcfg-{{ item.key }}'
src: etc/sysconfig/network-scrips/ifcfg.j2
dest: "/etc/sysconfig/network-scripts/ifcfg-{{ item.key }}"
owner: root
group: root
mode: 0644
with_dict: '{{ network_interfaces }}'
with_dict: "{{ network_interfaces }}"
loop_control:
label: "{{ item.key }}"
when: item.key in ansible_interfaces
@ -37,8 +37,8 @@
- name: Set dns server
template:
src: 'etc/resolv.conf.j2'
dest: '/etc/resolv.conf'
src: etc/resolv.conf.j2
dest: /etc/resolv.conf
owner: root
group: root
mode: 0644