feat: add checks for community.general collection and ensure default shell is set to bash
Some checks failed
Nix Format Check / check-format (push) Failing after 39s
Some checks failed
Nix Format Check / check-format (push) Failing after 39s
This commit is contained in:
@@ -3,9 +3,18 @@
|
||||
gather_facts: true
|
||||
|
||||
pre_tasks:
|
||||
- name: Install required collections
|
||||
ansible.builtin.command: ansible-galaxy collection install -r requirements.yml
|
||||
- name: Check if community.general collection is installed
|
||||
ansible.builtin.command: ansible-galaxy collection list community.general
|
||||
register: collection_check
|
||||
changed_when: false
|
||||
ignore_errors: true
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Install required collections
|
||||
ansible.builtin.command: ansible-galaxy collection install -r "{{ playbook_dir }}/requirements.yml"
|
||||
delegate_to: localhost
|
||||
when: collection_check.rc != 0 or "community.general" not in collection_check.stdout
|
||||
changed_when: collection_check.rc != 0 or "community.general" not in collection_check.stdout
|
||||
run_once: true
|
||||
|
||||
tasks:
|
||||
|
||||
Reference in New Issue
Block a user