From ea458a8f1d0b6025ba2ea382cf770284f871c606 Mon Sep 17 00:00:00 2001 From: Ronald Date: Tue, 31 Dec 2024 14:58:20 +0000 Subject: [PATCH] Prepend task names with filename --- tasks/connect.yml | 8 ++++---- tasks/proxmox.yml | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tasks/connect.yml b/tasks/connect.yml index 8d5babd..8668532 100644 --- a/tasks/connect.yml +++ b/tasks/connect.yml @@ -1,6 +1,6 @@ --- -- name: Ensure we don't have an incorrect SSH host key stored on the Ansible controller +- name: Connect - Ensure we don't have an incorrect SSH host key stored on the Ansible controller ansible.builtin.command: cmd: "ssh-keygen -R {{ ansible_host }}" register: create_vm_proxmox_remove_ssh_host_key_cmd @@ -10,7 +10,7 @@ - create_vm_proxmox_remove_ssh_host_key | bool delegate_to: localhost -- name: Wait for SSH to become available +- name: Connect - Wait for SSH to become available ansible.builtin.wait_for: host: "{{ ansible_host }}" port: 22 @@ -18,7 +18,7 @@ timeout: 120 delegate_to: localhost -- name: Get SSH host key +- name: Connect - Get SSH host key ansible.builtin.shell: cmd: "ssh-keyscan {{ ansible_host }} >> ~/.ssh/known_hosts" args: @@ -26,7 +26,7 @@ changed_when: true delegate_to: localhost -- name: Ensure we can connect +- name: Connect - Ensure we can connect ansible.builtin.wait_for_connection: connect_timeout: 10 delay: 5 diff --git a/tasks/proxmox.yml b/tasks/proxmox.yml index 162e750..4655bcc 100644 --- a/tasks/proxmox.yml +++ b/tasks/proxmox.yml @@ -1,6 +1,6 @@ --- -- name: Check if VM already exists +- name: Proxmox - Check if VM already exists community.general.proxmox_vm_info: api_host: "{{ create_vm_proxmox_host }}" api_user: "{{ create_vm_proxmox_user }}" @@ -11,7 +11,7 @@ - create_vm_proxmox_recreate_vm | bool delegate_to: localhost -- name: Delete VM if it already exists +- name: Proxmox - Delete VM if it already exists community.general.proxmox_kvm: api_host: "{{ create_vm_proxmox_host }}" api_user: "{{ create_vm_proxmox_user }}" @@ -26,7 +26,7 @@ - create_vm_proxmox_recreate_vm | bool delegate_to: localhost -- name: Check if VM already exists +- name: Proxmox - Check if VM already exists community.general.proxmox_vm_info: api_host: "{{ create_vm_proxmox_host }}" api_user: "{{ create_vm_proxmox_user }}" @@ -35,7 +35,7 @@ register: create_vm_proxmox_check_if_vm_exists delegate_to: localhost -- name: Clone VM in Proxmox +- name: Proxmox - Clone VM in Proxmox community.general.proxmox_kvm: api_host: "{{ create_vm_proxmox_host }}" api_user: "{{ create_vm_proxmox_user }}" @@ -52,7 +52,7 @@ - create_vm_proxmox_check_if_vm_exists.proxmox_vms | length == 0 delegate_to: localhost -- name: Manage virtual disks for virtual machine +- name: Proxmox - Manage virtual disks for virtual machine community.general.proxmox_disk: api_host: "{{ create_vm_proxmox_host }}" api_user: "{{ create_vm_proxmox_user }}" @@ -68,7 +68,7 @@ - create_vm_proxmox_vm_disks is defined delegate_to: localhost -- name: Add cloud-init drive +- name: Proxmox - Add cloud-init drive community.general.proxmox_kvm: api_host: "{{ create_vm_proxmox_host }}" api_user: "{{ create_vm_proxmox_user }}" @@ -80,7 +80,7 @@ ide2: "{{ create_vm_proxmox_cloudinit_storage_pool }}:cloudinit,format=raw" when: create_vm_proxmox_add_cloudinit_drive | bool -- name: Add cloud-init settings +- name: Proxmox - Add cloud-init settings community.general.proxmox_kvm: api_host: "{{ create_vm_proxmox_host }}" api_user: "{{ create_vm_proxmox_user }}" @@ -101,7 +101,7 @@ - create_vm_proxmox_configure_cloudinit | bool delegate_to: localhost -- name: Enable QEMU guest agent for VM +- name: Proxmox - Enable QEMU guest agent for VM community.general.proxmox_kvm: api_host: "{{ create_vm_proxmox_host }}" api_user: "{{ create_vm_proxmox_user }}" @@ -115,7 +115,7 @@ - create_vm_proxmox_enable_guest_agent | bool delegate_to: localhost -- name: Set VM to autostart +- name: Proxmox - Set VM to autostart community.general.proxmox_kvm: api_host: "{{ create_vm_proxmox_host }}" api_user: "{{ create_vm_proxmox_user }}" @@ -129,7 +129,7 @@ - create_vm_proxmox_start_vm_onboot | bool delegate_to: localhost -- name: Start VM +- name: Proxmox - Start VM community.general.proxmox_kvm: api_host: "{{ create_vm_proxmox_host }}" api_user: "{{ create_vm_proxmox_user }}"