diff --git a/awx_collection/galaxy.yml b/awx_collection/galaxy.yml index c197590ab3..cf3bdf6e87 100644 --- a/awx_collection/galaxy.yml +++ b/awx_collection/galaxy.yml @@ -9,29 +9,30 @@ # (* Changed to the base README.md file are lost upon *) # (* the build of the collection *) # (********************************************************) +--- authors: -- AWX Project Contributors + - AWX Project Contributors dependencies: {} description: Ansible content that interacts with the AWX or Ansible Tower API. documentation: https://github.com/ansible/awx/blob/devel/awx_collection/README.md homepage: https://www.ansible.com/ issues: https://github.com/ansible/awx/issues?q=is%3Aissue+label%3Acomponent%3Aawx_collection license: -- GPL-3.0-only + - GPL-3.0-only name: awx namespace: awx readme: README.md repository: https://github.com/ansible/awx tags: -- cloud -- infrastructure -- awx -- ansible -- automation + - cloud + - infrastructure + - awx + - ansible + - automation version: 0.0.1-devel build_ignore: -- tools -- setup.cfg -- galaxy.yml.j2 -- template_galaxy.yml -- '*.tar.gz' + - tools + - setup.cfg + - galaxy.yml.j2 + - template_galaxy.yml + - '*.tar.gz' diff --git a/awx_collection/plugins/module_utils/tower_api.py b/awx_collection/plugins/module_utils/tower_api.py index a0b8b789ff..d0120ec003 100644 --- a/awx_collection/plugins/module_utils/tower_api.py +++ b/awx_collection/plugins/module_utils/tower_api.py @@ -33,7 +33,7 @@ class ItemNotDefined(Exception): class TowerModule(AnsibleModule): # This gets set by the make process so whatever is in here is irrelevant - _COLLECTION_VERSION = "devel" + _COLLECTION_VERSION = "0.0.1-devel" _COLLECTION_TYPE = "awx" # This maps the collections type (awx/tower) to the values returned by the API # Those values can be found in awx/api/generics.py line 204 diff --git a/awx_collection/test/awx/conftest.py b/awx_collection/test/awx/conftest.py index bbfd6ad8a2..025b8d033d 100644 --- a/awx_collection/test/awx/conftest.py +++ b/awx_collection/test/awx/conftest.py @@ -108,7 +108,7 @@ def run_module(request, collection_import): sanitize_dict(py_data) resp._content = bytes(json.dumps(django_response.data), encoding='utf8') resp.status_code = django_response.status_code - resp.headers = {'X-API-Product-Name': 'AWX', 'X-API-Product-Version': 'devel'} + resp.headers = {'X-API-Product-Name': 'AWX', 'X-API-Product-Version': '0.0.1-devel'} if request.config.getoption('verbose') > 0: logger.info( diff --git a/awx_collection/test/awx/test_module_utils.py b/awx_collection/test/awx/test_module_utils.py index c7238d8c98..0f443890e8 100644 --- a/awx_collection/test/awx/test_module_utils.py +++ b/awx_collection/test/awx/test_module_utils.py @@ -93,9 +93,9 @@ def test_no_templated_values(collection_import): checked into source. """ TowerModule = collection_import('plugins.module_utils.tower_api').TowerModule - assert TowerModule._COLLECTION_VERSION == "devel", ( + assert TowerModule._COLLECTION_VERSION == "0.0.1-devel", ( 'The collection version is templated when the collection is built ' - 'and the code should retain the placeholder of "devel".' + 'and the code should retain the placeholder of "0.0.1-devel".' ) InventoryModule = collection_import('plugins.inventory.tower').InventoryModule assert InventoryModule.NAME == 'awx.awx.tower', ( diff --git a/awx_collection/tools/roles/template_galaxy/templates/galaxy.yml.j2 b/awx_collection/tools/roles/template_galaxy/templates/galaxy.yml.j2 index f7080bd4f0..d06ce3d008 100644 --- a/awx_collection/tools/roles/template_galaxy/templates/galaxy.yml.j2 +++ b/awx_collection/tools/roles/template_galaxy/templates/galaxy.yml.j2 @@ -9,29 +9,30 @@ # (* Changed to the base README.md file are lost upon *) # (* the build of the collection *) # (********************************************************) +--- authors: -- AWX Project Contributors + - AWX Project Contributors dependencies: {} description: Ansible content that interacts with the AWX or Ansible Tower API. documentation: https://github.com/ansible/awx/blob/devel/awx_collection/README.md homepage: https://www.ansible.com/ issues: https://github.com/ansible/awx/issues?q=is%3Aissue+label%3Acomponent%3Aawx_collection license: -- GPL-3.0-only + - GPL-3.0-only name: {{ collection_package }} namespace: {{ collection_namespace }} readme: README.md repository: https://github.com/ansible/awx tags: -- cloud -- infrastructure -- awx -- ansible -- automation + - cloud + - infrastructure + - awx + - ansible + - automation version: {{ collection_version_override | default(collection_version) }} build_ignore: -- tools -- setup.cfg -- galaxy.yml.j2 -- template_galaxy.yml -- '*.tar.gz' + - tools + - setup.cfg + - galaxy.yml.j2 + - template_galaxy.yml + - '*.tar.gz' diff --git a/awx_collection/tools/template_galaxy.yml b/awx_collection/tools/template_galaxy.yml index b71416741a..1c5e71f37e 100644 --- a/awx_collection/tools/template_galaxy.yml +++ b/awx_collection/tools/template_galaxy.yml @@ -27,13 +27,13 @@ set_fact: collection_version_override: 0.0.1-devel - - name: Template the galaxy.yml file + - name: Template the galaxy.yml source file template: src: "{{ collection_source }}/tools/roles/template_galaxy/templates/galaxy.yml.j2" dest: "{{ collection_source }}/galaxy.yml" force: true - - name: Template the README.md file + - name: Template the README.md source file template: src: "{{ collection_source }}/tools/roles/template_galaxy/templates/README.md.j2" dest: "{{ collection_source }}/README.md"