13 when: ansible_distribution == 'CentOS'
24 when: ansible_distribution == 'Fedora'
26 name: ansible-modules-hashivault,hvac,Jinja2
31 name: net.ipv4.ip_forward
51 xml: '{{ lookup("template", "virsh_network_default.xml.j2") }}'
56 bridge: 'br-{{ item }}'
58 with_items: '{{ virsh_enabled_networks }}'
59 - name: 'Configure IP on bridge'
60 shell: 'ip addr add 192.0.2.99/24 dev br-{{ item }}'
61 with_items: '{{ virsh_enabled_networks }}'
63 - name: 'Bring up bridge'
64 shell: 'ip link set up br-{{ item }}'
65 with_items: '{{ virsh_enabled_networks }}'
70 xml: '{{ lookup("template", "virsh_network_ovs.xml.j2") }}'
71 with_items: '{{ virsh_enabled_networks }}'
77 with_items: '{{ virsh_enabled_networks }}'
83 xml: '{{ lookup("template", "virsh_pool.xml.j2") }}'
88 - shell: cat /sys/module/kvm_intel/parameters/nested || true
89 register: nested_result
90 when: ansible_architecture == "x86_64"
91 - name: reload kvm_intel
94 path: /etc/modprobe.d/kvm_intel.conf
95 line: 'options kvm-intel nested=1'
104 - ansible_architecture == "x86_64"
105 - "'Y' not in nested_result.stdout"
112 - name: Generate SSH key for root if missing
113 shell: test -e ~/.ssh/id_rsa || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
115 - name: Check that /u/l/python3.4/site-packages/virtualbmc/vbmc.py exists
117 path: /usr/lib/python3.4/site-packages/virtualbmc/vbmc.py
120 - name: Manually patch vmbc to work with python3.x
122 line: " conn.defineXML(ET.tostring(tree, encoding='unicode'))"
124 path: /usr/lib/python3.4/site-packages/virtualbmc/vbmc.py
125 when: vbmc_py.stat.exists == True
127 - name: Add ssh retry to Ansible config
129 path: /etc/ansible/ansible.cfg
130 section: ssh_connection