Patches from tinkering with tests and default to devel version (#8)

This causes make install_collection to avoid templating the version
  so that it can still be used as-is in development
This commit is contained in:
Alan Rominger
2020-05-18 08:51:39 -04:00
committed by GitHub
parent b904ad68a6
commit 22cdc129ad
9 changed files with 43 additions and 25 deletions

View File

@@ -2,13 +2,15 @@
- name: Set the collection version in the tower_api.py file
replace:
path: "{{ collection_path }}/plugins/module_utils/tower_api.py"
regexp: '^ _COLLECTION_VERSION =.*'
regexp: '^ _COLLECTION_VERSION = "devel"'
replace: ' _COLLECTION_VERSION = "{{ collection_version }}"'
when:
- "awx_template_version | default(True)"
- name: Set the collection type in the tower_api.py file
replace:
path: "{{ collection_path }}/plugins/module_utils/tower_api.py"
regexp: '^ _COLLECTION_TYPE =.*'
regexp: '^ _COLLECTION_TYPE = "awx"'
replace: ' _COLLECTION_TYPE = "{{ collection_namespace }}"'
- name: Do file content replacements for non-default namespace or package name