| | |
| | | ansible-galaxy install |
| | | -r "{{ requirements_path }}" |
| | | -p "{{ ANSIBLE_REPO_PATH | default('.') }}/configs/{{ env_type }}/roles" |
| | | when: |
| | | - r_requirements_stat.stat.exists |
| | | - r_requirements_content | length > 0 |
| | | when: >- |
| | | r_requirements_stat.stat.exists |
| | | and r_requirements_content | length > 0 |
| | | and ( r_requirements_content is mapping |
| | | and 'roles' in r_requirements_content ) |
| | | or r_requirements_contet is sequence |
| | | |
| | | - name: Import collections from requirements.yml |
| | | command: >- |
| | | ansible-galaxy collection install |
| | | -r "{{ requirements_path }}" |
| | | -p "configs/{{ env_type }}/collections" |
| | | when: >- |
| | | r_requirements_stat.stat.exists |
| | | and r_requirements_content | length > 0 |
| | | and r_requirements_content is mapping |
| | | and "collections" in r_requirements_content |