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_hostname: localhost
network_fqdn: '' network_fqdn: localdomain
network_defaultif: '' network_defaultif: eth0
network_disable_ipv6: false network_disable_ipv6: false
network_dns_server: '8.8.8.8' network_dns_server: 8.8.8.8
network_interfaces: {} network_interfaces: {}

View File

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