1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/network/tasks/main.yml
Jerry Vonau cc8494608e reorder dhcpcd networking services - rebased edits
looks weird on redhat

add systemd reload
2017-11-06 12:33:41 -06:00

141 lines
2.6 KiB
YAML

- include: detected_network.yml
when: not installing
tags:
- network
- network-discover
- include: computed_network.yml
when: not installing
tags:
- network
- network-discover
- name: Set hostname
template: dest=/etc/hostname
src=network/hostname.j2
owner=root
mode=0644
tags:
- network
- domain
- name: Configure /etc/sysconfig/network
template: src=network/sysconfig.network.j2
dest=/etc/sysconfig/network
owner=root
group=root
mode=0644
tags:
- network
- domain
- name: Create iiab_domain_name flag
template: src=network/{{ item }}.j2
dest=/etc/sysconfig/{{ item }}
mode=0644
with_items:
- iiab_domain_name
register: domainname
tags:
- network
- domain
##### Start static ip address info for first run #####
#- include: static.yml
# when: 'iiab_wan_iface != "none" and wan_ip != "dhcp"'
##### End static ip address info
- include: hosts.yml
tags:
- network
##### end hostname setup
##### start install portion
# only needs to be done once
- include: named.yml
tags:
- named
- network
- include: dhcpd.yml
tags:
- dhcpd
- network
- include: squid.yml
tags:
- squid
- network
when: squid_install
- include: wondershaper.yml
tags:
- wondershaper
- network
- include: iptables.yml
tags:
- iptables
- network
- include: avahi.yml
tags:
- network
#### end install portion
#### start network layout
# setting installing would skip configuring network
# but would configure but not start services
- include: computed_network.yml
when: not installing
tags:
- network
- network-discover
# templates needed from above install section live here
- include: enable_services.yml
tags:
- network
- include: ifcfg_mods.yml
tags:
- network
when: is_redhat and not installing
- include: debian.yml
tags:
- network
when: is_debuntu and not is_rpi and not installing
- include: rpi_debian.yml
tags:
- network
when: is_debuntu and is_rpi and not installing
- include: hostapd.yml
when: not installing
tags:
- network
- name: Create IIAB network flags
template: src=network/{{ item }}.j2
dest=/etc/sysconfig/{{ item }}
mode=0644
with_items:
- iiab_wan_device
- iiab_lan_device
when: not installing
tags:
- network
#### end network layout
#### start services
- include: computed_services.yml
tags:
- network
- include: restart.yml
when: not installing
tags:
- network
#### end services