summaryrefslogtreecommitdiffstats
path: root/lib/ansible/playbooks/deploy_dependencies.yml
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2017-08-23 17:26:53 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-23 17:26:53 +0000
commitc6f04a5dee991a131a49c2fde9c5990fe2edac4e (patch)
tree6385096492e6526bf091bae4f3b956a1e865fbba /lib/ansible/playbooks/deploy_dependencies.yml
parent52b4c2556b909a1e61b50f0ff75778bed962ba85 (diff)
parentf4d388ea508ba00771e43a219ac64e0d430b73bd (diff)
Merge "Migrates Apex to Python"
Diffstat (limited to 'lib/ansible/playbooks/deploy_dependencies.yml')
-rw-r--r--lib/ansible/playbooks/deploy_dependencies.yml66
1 files changed, 66 insertions, 0 deletions
diff --git a/lib/ansible/playbooks/deploy_dependencies.yml b/lib/ansible/playbooks/deploy_dependencies.yml
new file mode 100644
index 00000000..77231622
--- /dev/null
+++ b/lib/ansible/playbooks/deploy_dependencies.yml
@@ -0,0 +1,66 @@
+---
+- hosts: localhost
+ tasks:
+ - sysctl:
+ name: net.ipv4.ip_forward
+ state: present
+ value: 1
+ sysctl_set: yes
+ - systemd:
+ name: dhcpd
+ state: stopped
+ enabled: no
+ ignore_errors: yes
+ - systemd:
+ name: libvirtd
+ state: started
+ enabled: yes
+ - systemd:
+ name: openvswitch
+ state: started
+ enabled: yes
+ - virt_net:
+ command: define
+ name: default
+ xml: '{{ lookup("template", "virsh_network_default.xml.j2") }}'
+ state: active
+ autostart: yes
+ - openvswitch_bridge:
+ bridge: 'br-{{ item }}'
+ state: present
+ with_items: '{{ virsh_enabled_networks }}'
+ - virt_net:
+ command: define
+ name: '{{ item }}'
+ xml: '{{ lookup("template", "virsh_network_ovs.xml.j2") }}'
+ autostart: yes
+ with_items: '{{ virsh_enabled_networks }}'
+ - virt_net:
+ command: create
+ name: '{{ item }}'
+ with_items: '{{ virsh_enabled_networks }}'
+ - virt_pool:
+ name: default
+ command: define
+ autostart: yes
+ state: active
+ xml: '{{ lookup("template", "virsh_pool.xml.j2") }}'
+ - lineinfile:
+ path: /etc/modprobe.d/kvm_intel.conf
+ line: 'options kvm-intel nested=1'
+ create: yes
+ when: ansible_architecture == "x86_64"
+ - modprobe:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - kvm
+ - kvm_intel
+ when: ansible_architecture == "x86_64"
+ - name: Generate SSH key for root if missing
+ shell: test -e ~/.ssh/id_rsa || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
+ - name: Manually patch vmbc to work with python3.x
+ lineinfile:
+ line: " conn.defineXML(ET.tostring(tree, encoding='unicode'))"
+ regexp: "tostring"
+ path: /usr/lib/python3.4/site-packages/virtualbmc/vbmc.py