added template for old lxc config keys before 2.1
Change-Id: I35c94aa712586465c1144575370873f112d22364
diff --git a/playbooks/roles/lab-lava-lxcnet/tasks/main.yml b/playbooks/roles/lab-lava-lxcnet/tasks/main.yml
index 26cef7c..3ec5997 100644
--- a/playbooks/roles/lab-lava-lxcnet/tasks/main.yml
+++ b/playbooks/roles/lab-lava-lxcnet/tasks/main.yml
@@ -19,7 +19,7 @@
mode: 0644
notify: lxc-net - restart lxc-net
- - name: Modify LXC default.conf
+ - name: Modify LXC default.conf lxc greather than 2.1
template:
src: lxc-default.j2
dest: /etc/lxc/default.conf
@@ -28,3 +28,12 @@
mode: 0644
notify: lxc - restart lxc
+ - name: Modify LXC default.conf lxc 2.0 and older
+ template:
+ src: lxc-old-default.j2
+ dest: /etc/lxc/default.conf
+ owner: root
+ group: root
+ mode: 0644
+ notify: lxc - restart lxc
+
diff --git a/playbooks/roles/lab-lava-lxcnet/templates/lxc-old-default.j2 b/playbooks/roles/lab-lava-lxcnet/templates/lxc-old-default.j2
new file mode 100644
index 0000000..33f32a3
--- /dev/null
+++ b/playbooks/roles/lab-lava-lxcnet/templates/lxc-old-default.j2
@@ -0,0 +1,3 @@
+lxc.network.0.type = veth
+lxc.network.0.flags = up
+lxc.network.0.link = {{ lxc_bridge_name }}