diff --git a/ansible/gold-master.yml b/ansible/gold-master.yml index 90f4aacffdb5073dbfe43be2e5c2f6794e40b35b..65f03a50aa9d476d1a711b843ced2d8c294dabee 100644 --- a/ansible/gold-master.yml +++ b/ansible/gold-master.yml @@ -4,9 +4,31 @@ - hosts: localhost tasks: + - name: create br-wan profile + lxd_container: + name: br-wan + type: profile + state: present + description: Connect eth0 to br-wan + devices: + eth0: + name: eth0 + nictype: bridged + parent: br-wan + type: nic + # NOTE: on first run this fetches the whole image (~650MB) over the Internet - name: create gold-master container - lxd_container: name=gold-master image=ubuntu:16.04 state=started + lxd_container: + name: gold-master + state: started + source: + type: image + mode: pull + server: https://images.linuxcontainers.org + protocol: lxd + alias: ubuntu/xenial/amd64 + profiles: ["br-wan"] # Ansible cannot run in a container unless python2 is present. # It can't even gather "facts" about it. So we must force @@ -33,8 +55,7 @@ - zip - unzip -# Now shut it down so we can clone it - - hosts: localhost tasks: - - lxd_container: name=gold-master state=stopped + - name: stop container so it can be cloned + lxd_container: name=gold-master state=stopped