Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (51 sloc) 1.49 KB
- name: common tags
tags:
- vbmc
- lab
- builder-bootstrap
block:
- name: push virtualbmc script
file:
path: /usr/local/sbin/vbmc-run
state: absent
- name: deactivate custom vbmc service
service:
name: vbmc
state: stopped
enabled: no
ignore_errors: yes
- name: remove custom systemd unit file
file:
path: /etc/systemd/system/vbmc.service
state: absent
- name: start virtualbmc
service:
name: virtualbmc
enabled: yes
state: started
- name: Create the Virtual BMCs
command: "vbmc add {{vm_prefix}}-{{ item.name }} --port 112{{item.interfaces.0.mac|replace('24:42:53:21:52:','')}} --libvirt-uri qemu:///system --username ADMIN --password ADMIN"
args:
creates: /root/.vbmc/{{vm_prefix}}-{{ item.name }}/config
loop: "{{ vms }}"
loop_control:
label: "{{ item.name }}"
register: vbmc
ignore_errors: yes
- name: Start the Virtual BMCs (virtualbmc >= 1.4.0+)
command: "vbmc start {{vm_prefix}}-{{ item.name }}"
loop: "{{ vms }}"
loop_control:
label: "{{ item.name }}"
ignore_errors: yes
when:
- vbmc.changed
- name: open firewall on libvirt link
iptables:
action: insert
chain: INPUT
comment: "allow vbmc access from undercloud"
destination: "192.168.122.1"
destination_port: "11200:11299"
jump: ACCEPT
protocol: udp