diff --git a/ansible/hosts b/ansible/hosts index b03e590b76764d55b14c1d6ae23ac993e03a446d..1ec881367c7ca6ab235b1e19ce5872f7b328855e 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -5,14 +5,14 @@ gold-master ansible_connection=lxd nagios-master ansible_connection=lxd [nagios-all] -nagios1 ansible_connection=lxd ipv4_address=10.10.1.1 ipv4_gateway=10.10.1.254 -nagios2 ansible_connection=lxd ipv4_address=10.10.1.2 ipv4_gateway=10.10.1.254 -nagios3 ansible_connection=lxd ipv4_address=10.10.1.3 ipv4_gateway=10.10.1.254 -nagios4 ansible_connection=lxd ipv4_address=10.10.1.4 ipv4_gateway=10.10.1.254 -nagios5 ansible_connection=lxd ipv4_address=10.10.2.5 ipv4_gateway=10.10.2.254 -nagios6 ansible_connection=lxd ipv4_address=10.10.2.6 ipv4_gateway=10.10.2.254 -nagios7 ansible_connection=lxd ipv4_address=10.10.2.7 ipv4_gateway=10.10.2.254 -nagios8 ansible_connection=lxd ipv4_address=10.10.2.8 ipv4_gateway=10.10.2.254 +nagios1 ansible_connection=lxd ipv4_address=10.10.1.1 ipv4_gateway=10.10.1.254 profiles=br-int1 +nagios2 ansible_connection=lxd ipv4_address=10.10.1.2 ipv4_gateway=10.10.1.254 profiles=br-int1 +nagios3 ansible_connection=lxd ipv4_address=10.10.1.3 ipv4_gateway=10.10.1.254 profiles=br-int1 +nagios4 ansible_connection=lxd ipv4_address=10.10.1.4 ipv4_gateway=10.10.1.254 profiles=br-int1 +nagios5 ansible_connection=lxd ipv4_address=10.10.2.5 ipv4_gateway=10.10.2.254 profiles=br-int2 +nagios6 ansible_connection=lxd ipv4_address=10.10.2.6 ipv4_gateway=10.10.2.254 profiles=br-int2 +nagios7 ansible_connection=lxd ipv4_address=10.10.2.7 ipv4_gateway=10.10.2.254 profiles=br-int2 +nagios8 ansible_connection=lxd ipv4_address=10.10.2.8 ipv4_gateway=10.10.2.254 profiles=br-int2 [noc] nagios-noc ansible_connection=lxd ipv4_address=10.10.0.250 ipv6_address=2001:db8:100::250 diff --git a/ansible/lxd-setup.yml b/ansible/lxd-setup.yml index cc8eb6d3cd300c380fd7ec346a1ab74b708b809a..b2278295181f6882b83631316dc45d39f6cf18a3 100644 --- a/ansible/lxd-setup.yml +++ b/ansible/lxd-setup.yml @@ -3,24 +3,25 @@ - hosts: localhost tasks: - - name: create br-wan profile + - name: create {{item}} profile lxd_profile: - name: br-wan - description: Connect eth0 to br-wan + name: "{{item}}" + description: Connect eth0 to {{item}} devices: eth0: name: eth0 nictype: bridged - parent: br-wan - type: nic - - - name: create br-lan profile - lxd_profile: - name: br-lan - description: Connect eth0 to br-lan - devices: - eth0: - name: eth0 - nictype: bridged - parent: br-lan + parent: "{{item}}" type: nic + with_items: + - br-wan + - br-lan + - br-int1 + - br-int2 + - br-int3 + - br-int4 + - br-int5 + - br-int6 + - br-int7 + - br-int8 + - br-int9 diff --git a/ansible/nagios-clones.yml b/ansible/nagios-clones.yml index a6e5b5c738fbd867899b43beaaa3a58035ef17b8..91409ecd2cc93e5c57eede2d4149807cc50149da 100644 --- a/ansible/nagios-clones.yml +++ b/ansible/nagios-clones.yml @@ -11,6 +11,5 @@ #- role: lxd_delete - role: lxd_copy source: nagios-master - profiles: [br-lan] # FIXME - role: lxd_static_ip - role: use_apt_cacher