blob: 8e90c9ec80105dd165b5d97aadc104a698d480b2 [file] [log] [blame]
Andy Bavier30d27c92016-09-15 15:59:17 -04001---
2- name: Install software
3 apt:
4 name={{ item }}
5 update_cache=yes
6 cache_valid_time=3600
7 become: yes
8 register: result
9 until: result | success
10 retries: 15
11 delay: 60
12 with_items:
13 - lxc
14
15- name: set lxc bridge interface to be databr
16 become: yes
17 lineinfile:
18 dest: /etc/lxc/default.conf
19 regexp: "^lxc.network.link ="
20 line: "lxc.network.link = databr"
21
22- name: Create testclient
23 become: yes
24 shell: lxc-ls | grep testclient || lxc-create -t ubuntu -n testclient
25 tags:
26 - skip_ansible_lint # FIXME: should used lxc_container module
27
28- name: Start testclient
29 become: yes
30 shell: lxc-info -n testclient -s | grep RUNNING || lxc-start -d -n testclient
31 tags:
32 - skip_ansible_lint # FIXME: should used lxc_container module
33
34- name: Set up networking inside the testclient for testing sample CORD subscriber
35 become: yes
36 shell: "{{ item }}"
37 with_items:
38 - "lxc-attach -n testclient -- bash -c 'ip link show eth0.222 || ip link add link eth0 name eth0.222 type vlan id 222'"
39 - "lxc-attach -n testclient -- bash -c 'ip link show eth0.222.111 || ip link add link eth0.222 name eth0.222.111 type vlan id 111'"
40 - "lxc-attach -n testclient -- ifconfig eth0.222 up"
41 - "lxc-attach -n testclient -- ifconfig eth0.222.111 up"
42 tags:
43 - skip_ansible_lint # non-trivial use case