Zack Williams | a3e4056 | 2016-07-05 12:05:39 -0700 | [diff] [blame] | 1 | --- |
| 2 | - hosts: nova-compute-1 |
| 3 | remote_user: ubuntu |
| 4 | |
| 5 | tasks: |
| 6 | - name: Install software |
| 7 | apt: |
| 8 | name={{ item }} |
| 9 | update_cache=yes |
| 10 | cache_valid_time=3600 |
| 11 | become: yes |
| 12 | with_items: |
| 13 | - lxc |
| 14 | |
| 15 | # replaces: sudo sed -i 's/lxcbr0/databr/' /etc/lxc/default.conf |
| 16 | - name: set lxc bridge interface to be databr |
| 17 | become: yes |
| 18 | lineinfile: |
| 19 | dest: /etc/lxc/default.conf |
| 20 | regexp: "^lxc.network.link =" |
| 21 | line: "lxc.network.link = databr" |
| 22 | |
| 23 | - name: Create testclient |
| 24 | become: yes |
Andy Bavier | 671e570 | 2016-07-07 21:48:18 -0400 | [diff] [blame] | 25 | shell: lxc-ls | grep testclient || lxc-create -t ubuntu -n testclient |