From b33280b443ca2bd6f5d31e3a8e22c4b7978c0861 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Wed, 9 Jun 2021 15:41:46 +0200 Subject: [PATCH] Fix variable/tasks name --- ansible/roles/firstboot/files/ansible_payload/playbook.yml | 2 +- .../files/ansible_payload/roles/vapp/tasks/main.yml | 5 ++++- ansible/roles/os/tasks/ansible.yml | 4 ++-- ansible/roles/os/tasks/main.yml | 4 ++-- ansible/roles/os/tasks/{network.yml => services.yml} | 0 ansible/roles/os/vars/main.yml | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) rename ansible/roles/os/tasks/{network.yml => services.yml} (100%) diff --git a/ansible/roles/firstboot/files/ansible_payload/playbook.yml b/ansible/roles/firstboot/files/ansible_payload/playbook.yml index fc4822f..2650368 100644 --- a/ansible/roles/firstboot/files/ansible_payload/playbook.yml +++ b/ansible/roles/firstboot/files/ansible_payload/playbook.yml @@ -1,5 +1,5 @@ --- -- hosts: 127.0.0.1 +- hosts: localhost connection: local gather_facts: false # become: true diff --git a/ansible/roles/firstboot/files/ansible_payload/roles/vapp/tasks/main.yml b/ansible/roles/firstboot/files/ansible_payload/roles/vapp/tasks/main.yml index fcaca2d..cf094bd 100644 --- a/ansible/roles/firstboot/files/ansible_payload/roles/vapp/tasks/main.yml +++ b/ansible/roles/firstboot/files/ansible_payload/roles/vapp/tasks/main.yml @@ -1,7 +1,10 @@ - name: Store current vApp configuration ansible.builtin.shell: cmd: vmtoolsd --cmd "info-get guestinfo.ovfEnv" - register: ovfEnv + register: ovfenv +- name: DEBUG variable contents + ansible.builtin.debug: + ovfenv - name: Parse XML into variables community.general.xml: xmlstring: "{{ ovfEnv }}" diff --git a/ansible/roles/os/tasks/ansible.yml b/ansible/roles/os/tasks/ansible.yml index 338be6b..a12b610 100644 --- a/ansible/roles/os/tasks/ansible.yml +++ b/ansible/roles/os/tasks/ansible.yml @@ -1,6 +1,6 @@ -- name: Install pip-packages +- name: Install ansible through pip3 ansible.builtin.pip: name: "{{ item }}" executable: pip3 state: latest - loop: "{{ pip-packages }}" + loop: "{{ pip_packages }}" diff --git a/ansible/roles/os/tasks/main.yml b/ansible/roles/os/tasks/main.yml index 4983a43..d0bb813 100644 --- a/ansible/roles/os/tasks/main.yml +++ b/ansible/roles/os/tasks/main.yml @@ -4,8 +4,8 @@ - name: Remove cloud-init import_tasks: cloud-init.yml -- name: Configure network - import_tasks: network.yml +- name: Configure services + import_tasks: services.yml - name: Install packages import_tasks: packages.yml diff --git a/ansible/roles/os/tasks/network.yml b/ansible/roles/os/tasks/services.yml similarity index 100% rename from ansible/roles/os/tasks/network.yml rename to ansible/roles/os/tasks/services.yml diff --git a/ansible/roles/os/vars/main.yml b/ansible/roles/os/vars/main.yml index a08f2e9..4dce7e2 100644 --- a/ansible/roles/os/vars/main.yml +++ b/ansible/roles/os/vars/main.yml @@ -6,6 +6,6 @@ packages: # (libxml2-utils) Dependency for xmllint - libxml2-utils -pip-packages: +pip_packages: - pip - ansible-core