Add default name for user collections file
The get-ansible-collection-requirements playbook cannot be used standalone without passing an extra var for the name of the user collections file. This patch allows the playbook to be run standalone and the default name will be used automatically, still allowing an override to be used as currently happens in scripts/bootstrap-ansible.sh Sonetimes it is desireable to have a simple way to update the installed collections without running other parts of bootstrap-ansible, or look up flags to disable other side-effects. Change-Id: I27131ecaa3bc0ef459d2c353be9531608dd9d9ab
This commit is contained in:
parent
e88ba9b917
commit
7ba58e15fd
@ -100,5 +100,6 @@
|
||||
collection_file: "{{ playbook_dir }}/../ansible-collection-requirements.yml"
|
||||
required_collections: "{{ lookup('file', collection_file) | from_yaml }}"
|
||||
collection_path_default: '/etc/ansible/'
|
||||
user_collection_file: 'user-collection-requirements.yml'
|
||||
user_collections: "{{ lookup('file', user_collections_path, errors='ignore')|default([], true) | from_yaml }}"
|
||||
user_collections_path: "{{ lookup('env', 'OSA_CONFIG_DIR') | default('/etc/openstack_deploy', true) ~ '/' ~ (user_collection_file|default('')) }}"
|
||||
user_collections_path: "{{ lookup('env', 'OSA_CONFIG_DIR') | default('/etc/openstack_deploy', true) ~ '/' ~ user_collection_file }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user