diff --git a/roles/sshd/molecule/default/converge.yml b/roles/sshd/molecule/default/converge.yml index dbdf6c3..495367f 100644 --- a/roles/sshd/molecule/default/converge.yml +++ b/roles/sshd/molecule/default/converge.yml @@ -1,4 +1,30 @@ --- +- name: Show which mortis.kamino copy this run loads + hosts: all + gather_facts: false + run_once: true + tasks: + - name: Print the controller's collection paths and the copy that resolves first + delegate_to: localhost + ansible.builtin.debug: + msg: + - "AC_ROOT={{ lookup('ansible.builtin.env', 'AC_ROOT') }}" + - "ANSIBLE_HOME={{ lookup('ansible.builtin.env', 'ANSIBLE_HOME') }}" + - "env ANSIBLE_COLLECTIONS_PATH={{ lookup('ansible.builtin.env', 'ANSIBLE_COLLECTIONS_PATH') }}" + - "config COLLECTIONS_PATHS={{ lookup('ansible.builtin.config', 'COLLECTIONS_PATHS') }}" + - "{{ lookup('ansible.builtin.pipe', 'ansible-galaxy collection list mortis.kamino 2>&1') }}" + - "{{ lookup('ansible.builtin.pipe', 'ls -d \"$ANSIBLE_HOME\"/collections/ansible_collections/mortis/kamino 2>&1') }}" + +- name: Print the role_path of a loaded mortis.kamino role + hosts: all + gather_facts: false + run_once: true + tasks: + - name: Load the role's validation entry point only + ansible.builtin.include_role: + name: mortis.kamino.sshd + tasks_from: __debug_role_path + # The production profile: Ubuntu 24.04 LXCs. Only the profile name and the user are supplied. - name: Converge the role with a valid profile hosts: all diff --git a/roles/sshd/tasks/__debug_role_path.yml b/roles/sshd/tasks/__debug_role_path.yml new file mode 100644 index 0000000..b3b2200 --- /dev/null +++ b/roles/sshd/tasks/__debug_role_path.yml @@ -0,0 +1,5 @@ +--- +# DEBUG for #355, never merged. +- name: Print the directory this role was loaded from + ansible.builtin.debug: + var: role_path