From 226839e8efe61181c36777f0e5799b4e78788459 Mon Sep 17 00:00:00 2001 From: Brian Candler Date: Thu, 7 Jul 2016 21:31:12 +0000 Subject: [PATCH] Apply br-intX profiles to clones --- ansible/hosts | 16 ++++++++-------- ansible/lxd-setup.yml | 31 ++++++++++++++++--------------- ansible/nagios-clones.yml | 1 - 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ansible/hosts b/ansible/hosts index b03e590..1ec8813 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 cc8eb6d..b227829 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 a6e5b5c..91409ec 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 -- GitLab