Added emma play and updated roles for multi-server setup
This commit is contained in:
parent
dc538a3971
commit
75e0f73ba8
10 changed files with 151 additions and 0 deletions
5
roles/any.common.static-ip/handlers/main.yml
Normal file
5
roles/any.common.static-ip/handlers/main.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: restart networking
|
||||
service:
|
||||
name: networking
|
||||
state: restarted
|
||||
6
roles/any.common.static-ip/tasks/main.yml
Normal file
6
roles/any.common.static-ip/tasks/main.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: Install networking config file.
|
||||
template:
|
||||
src: interfaces.j2
|
||||
dest: /etc/network/interfaces.d/{{ interface }}
|
||||
notify: restart networking
|
||||
7
roles/any.common.static-ip/templates/interfaces.j2
Normal file
7
roles/any.common.static-ip/templates/interfaces.j2
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
auto {{ interface }}
|
||||
iface {{ interface }} inet static
|
||||
address {{ static_ip }}
|
||||
broadcast {{ broadcast_ip }}
|
||||
netmask 255.255.255.0
|
||||
gateway {{ router_ip }}
|
||||
dns-nameservers {{ router_ip }} 8.8.8.8
|
||||
Loading…
Add table
Add a link
Reference in a new issue