summaryrefslogtreecommitdiffstats
path: root/lib/ansible/playbooks
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-08-29 22:25:10 -0400
committerTim Rozet <trozet@redhat.com>2017-08-29 22:37:33 -0400
commit3483b1077086ec5773ffafdf7304d127f30e6d62 (patch)
tree62267e77cd14265a9627bdf1125a67d204865b40 /lib/ansible/playbooks
parent15d8c6b0dff0153a5d106d827442e65fe4c9b559 (diff)
Fixes missing iso packages and idempotency of virt resources
Python packages for ansible (py2.x) were missing causing ansible to fail. This patch adds those packages to the ISO and deploy dependencies playbook. Also includes fixes for deploy_dependencies playbook for virt resources to make them idempotent by removing using 'command' and instead just declaring 'state'. Change-Id: I9311184a6f3c40ead0a8ba16fa0b61667876cf12 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib/ansible/playbooks')
-rw-r--r--lib/ansible/playbooks/deploy_dependencies.yml19
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/ansible/playbooks/deploy_dependencies.yml b/lib/ansible/playbooks/deploy_dependencies.yml
index 6db94ab4..8a575216 100644
--- a/lib/ansible/playbooks/deploy_dependencies.yml
+++ b/lib/ansible/playbooks/deploy_dependencies.yml
@@ -1,6 +1,12 @@
---
- hosts: localhost
tasks:
+ - yum:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - python-lxml
+ - libvirt-python
- sysctl:
name: net.ipv4.ip_forward
state: present
@@ -30,21 +36,24 @@
state: present
with_items: '{{ virsh_enabled_networks }}'
- virt_net:
- command: define
+ state: present
name: '{{ item }}'
xml: '{{ lookup("template", "virsh_network_ovs.xml.j2") }}'
- autostart: yes
with_items: '{{ virsh_enabled_networks }}'
- virt_net:
- command: create
+ state: active
name: '{{ item }}'
+ autostart: yes
with_items: '{{ virsh_enabled_networks }}'
- virt_pool:
name: default
- command: define
autostart: yes
- state: active
+ state: present
xml: '{{ lookup("template", "virsh_pool.xml.j2") }}'
+ - virt_pool:
+ name: default
+ autostart: yes
+ state: active
- lineinfile:
path: /etc/modprobe.d/kvm_intel.conf
line: 'options kvm-intel nested=1'