---
- hosts: localhost
tasks:
+ - yum:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - python-lxml
+ - libvirt-python
- sysctl:
name: net.ipv4.ip_forward
state: present
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'
regexp: "tostring"
path: /usr/lib/python3.4/site-packages/virtualbmc/vbmc.py
when: vbmc_py.stat.exists == True
+ - name: Add ssh retry to Ansible config
+ ini_file:
+ path: /etc/ansible/ansible.cfg
+ section: ssh_connection
+ option: retries
+ value: 5