aboutsummaryrefslogtreecommitdiffstats
path: root/roles/vmm/tasks/generate_vmconf.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/vmm/tasks/generate_vmconf.yml')
-rw-r--r--roles/vmm/tasks/generate_vmconf.yml21
1 files changed, 17 insertions, 4 deletions
diff --git a/roles/vmm/tasks/generate_vmconf.yml b/roles/vmm/tasks/generate_vmconf.yml
index c4e80d8..e8f8245 100644
--- a/roles/vmm/tasks/generate_vmconf.yml
+++ b/roles/vmm/tasks/generate_vmconf.yml
@@ -4,13 +4,26 @@
---
+- name: Start ip forwarding
+ shell: sysctl net.inet.ip{{ item }}.forwarding=1
+ loop:
+ - ""
+ - "6"
+
+- name: Enable ip forwarding
+ lineinfile:
+ path: /etc/sysctl.conf
+ regexp: "^net.inet.ip{{ item }}.forwarding="
+ line: "net.inet.ip{{ item }}.forwarding=1"
+ loop:
+ - ""
+ - "6"
+
- name: Create network switch
- template:
- src: templates/hostname.j2
- dest: "/etc/hostname.{{ vmm.switch.interface }}"
+ shell: echo "add {{ hypervisor.interface }}" > /etc/hostname.{{ vmm.switch.iface }}
- name: Start network switch
- shell: "sh /etc/netstart {{ vmm.switch.interface }}"
+ shell: "sh /etc/netstart {{ vmm.switch.iface }}"
- name: Generate vmm configuration
template:
remember that computers suck.