blob: 4bb253ab601aa4814c791dfa7d35d0264152f9c4 [file] [log] [blame]
alshabib4997cd72016-05-24 22:48:29 -07001- name: Remove lxc default config
2 become: yes
3 file: path=/etc/lxc/default.conf state=absent
4
5- name: Copy default lxc file
6 become: yes
7 copy:
8 src: files/default.conf
9 dest: /etc/lxc/default.conf
10 mode: 644
11
12- name: Create onos1 container
13 lxc_container:
14 name: onos1
15 container_log: true
16 template: ubuntu
17 state: started
18 template_options: --release trusty
19 container_config:
20 - "lxc.network.ipv4=10.100.198.201/24"
alshabibbdb7b372016-05-25 09:46:49 -070021 container_command: |
22 ln -s /usr/lib/jvm/java/bin/java /usr/bin/java
alshabib4997cd72016-05-24 22:48:29 -070023 apt-get update
24 apt-get install -y openssh-server
25 echo "ubuntu ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-onos-sudoers
26
27- name: Create onos2 container
28 lxc_container:
29 name: onos2
30 container_log: true
31 template: ubuntu
32 state: started
33 template_options: --release trusty
34 container_config:
35 - "lxc.network.ipv4=10.100.198.202/24"
36 container_command: |
37 ln -s /usr/lib/jvm/java/bin/java /usr/bin/java
38 apt-get update
39 apt-get install -y openssh-server
40 echo "ubuntu ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-onos-sudoers
41
42- name: Create onos3 container
43 lxc_container:
44 name: onos3
45 container_log: true
46 template: ubuntu
47 state: started
48 template_options: --release trusty
49 container_config:
50 - "lxc.network.ipv4=10.100.198.203/24"
51 container_command: |
52 ln -s /usr/lib/jvm/java/bin/java /usr/bin/java
53 apt-get update
54 apt-get install -y openssh-server
55 echo "ubuntu ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-onos-sudoers