Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/set-variables-group-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,9 @@
**day2_compute_node.vm_vm_ip** | IPv4 address of the compute node. | 192.168.10.99
**day2_compute_node.vm_vm_ipv6** | IPv6 address of the compute node. | fd00::99
**day2_compute_node.vm_mac** | MAC address of the compute node if use_dhcp variable is 'True'. | 52:54:00:18:1A:2B
**day2_compute_node.vm_vm_interface** | The network interface used for given IP addresses of the compute node. | enc1
**day2_compute_node.vm_interface** | The network interface used for given IP addresses of the compute node. | enc1
**day2_compute_node.hostname** | The hostname of the KVM host | kvm-host-01
**day2_compute_node.host_user** | KVM host user which is used to create the VM | root
**day2_compute_node.host_arch** | KVM host architecture. | s390x

## 19 - (Optional) Agent Based Installer
Expand Down
4 changes: 4 additions & 0 deletions playbooks/create_compute_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# vm_mac: <your VM MAC address, when DHCP is used>
# vm_interface: <your VM network interface used for the IP addresses>
# hostname: <KVM host name where the VM is created>
# host_user: <KVM host user which is used to create the VM>
# host_arch: <KVM host architecture>
#
# Execute the playbook with '--extra-vars' option.
Expand Down Expand Up @@ -81,6 +82,9 @@

roles:
- role: common
- role: delete_compute_node
# Some tasks will be delegated to the bastion host and target KVM host
param_compute_node: "{{ day2_compute_node }}"
- role: print_node_status
- role: update_ignition_files

Expand Down
1 change: 1 addition & 0 deletions playbooks/delete_compute_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# vm_mac: <your VM MAC address, when DHCP is used>
# vm_interface: <your VM network interface used for the IP addresses>
# hostname: <KVM host name where the VM is created>
# host_user: <KVM host user which is used to create the VM>
# host_arch: <KVM host architecture>
#
# Execute the playbook with '--extra-vars' option.
Expand Down
1 change: 1 addition & 0 deletions roles/create_compute_node/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- name: "Create compute node on KVM host {{ param_compute_node.hostname }}"
tags: create_compute_node
when: param_compute_node.vm_name is defined
remote_user: "{{ param_compute_node.host_user }}"
Comment thread
AmadeusPodvratnik marked this conversation as resolved.
delegate_to: "{{ param_compute_node.hostname }}"
block:
- name: Delete compute node VM, if already exists
Expand Down
1 change: 1 addition & 0 deletions roles/delete_compute_node/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- name: Delete compute node VM on KVM host and print command output
tags: delete_compute_node
when: param_compute_node.hostname is defined
remote_user: "{{ param_compute_node.host_user }}"
delegate_to: "{{ param_compute_node.hostname }}"
block:
- name: Delete compute node VM on KVM host
Expand Down