mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 19:37:38 -02:30
rename playbook vars to have collection_
This commit is contained in:
6
Makefile
6
Makefile
@@ -383,8 +383,8 @@ prepare_collection_venv:
|
|||||||
$(VENV_BASE)/awx/bin/pip install --target=$(COLLECTION_VENV) git+https://github.com/ansible/tower-cli.git
|
$(VENV_BASE)/awx/bin/pip install --target=$(COLLECTION_VENV) git+https://github.com/ansible/tower-cli.git
|
||||||
|
|
||||||
COLLECTION_TEST_DIRS ?= awx_collection/test/awx
|
COLLECTION_TEST_DIRS ?= awx_collection/test/awx
|
||||||
COLLECTION_PACKAGE_NAME ?= awx
|
COLLECTION_PACKAGE ?= awx
|
||||||
COLLECTION_NAMESPACE_NAME ?= awx
|
COLLECTION_NAMESPACE ?= awx
|
||||||
|
|
||||||
test_collection:
|
test_collection:
|
||||||
@if [ "$(VENV_BASE)" ]; then \
|
@if [ "$(VENV_BASE)" ]; then \
|
||||||
@@ -398,7 +398,7 @@ flake8_collection:
|
|||||||
test_collection_all: prepare_collection_venv test_collection flake8_collection
|
test_collection_all: prepare_collection_venv test_collection flake8_collection
|
||||||
|
|
||||||
build_collection:
|
build_collection:
|
||||||
ansible-playbook -i localhost, awx_collection/template_galaxy.yml -e package_name=$(COLLECTION_PACKAGE_NAME) -e namespace_name=$(COLLECTION_NAMESPACE_NAME) -e package_version=$(VERSION)
|
ansible-playbook -i localhost, awx_collection/template_galaxy.yml -e collection_package=$(COLLECTION_PACKAGE) -e namespace_name=$(COLLECTION_NAMESPACE) -e package_version=$(VERSION)
|
||||||
ansible-galaxy collection build awx_collection --output-path=awx_collection
|
ansible-galaxy collection build awx_collection --output-path=awx_collection
|
||||||
|
|
||||||
test_unit:
|
test_unit:
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ homepage: https://ansible.com
|
|||||||
issues: https://github.com/ansible/awx/issues
|
issues: https://github.com/ansible/awx/issues
|
||||||
license:
|
license:
|
||||||
- GPL-3.0-only
|
- GPL-3.0-only
|
||||||
name: {{ package_name }}
|
name: {{ collection_package }}
|
||||||
namespace: {{ namespace_name }}
|
namespace: {{ collection_namespace }}
|
||||||
readme: README.md
|
readme: README.md
|
||||||
repository: https://github.com/ansible/awx
|
repository: https://github.com/ansible/awx
|
||||||
tags: []
|
tags: []
|
||||||
version: {{ package_version }}
|
version: {{ collection_version }}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
gather_facts: false
|
gather_facts: false
|
||||||
connection: local
|
connection: local
|
||||||
vars:
|
vars:
|
||||||
package_name: awx
|
collection_package: awx
|
||||||
namespace_name: awx
|
collection_namespace: awx
|
||||||
package_version: 0.0.1
|
collection_version: 0.0.1 # not for updating, pass in extra_vars
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Do file content replacements for non-default namespace or package name
|
- name: Do file content replacements for non-default namespace or package name
|
||||||
@@ -19,10 +19,10 @@
|
|||||||
replace:
|
replace:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
regexp: '^extends_documentation_fragment: awx.awx.auth$'
|
regexp: '^extends_documentation_fragment: awx.awx.auth$'
|
||||||
replace: 'extends_documentation_fragment: {{ namespace_name }}.{{ package_name }}.auth'
|
replace: 'extends_documentation_fragment: {{ collection_namespace }}.{{ collection_package }}.auth'
|
||||||
with_items: "{{ module_files.files }}"
|
with_items: "{{ module_files.files }}"
|
||||||
when:
|
when:
|
||||||
- (package_name != 'awx') or (namespace_name != 'awx')
|
- (collection_package != 'awx') or (collection_namespace != 'awx')
|
||||||
|
|
||||||
- name: Template the galaxy.yml file
|
- name: Template the galaxy.yml file
|
||||||
template: src={{ playbook_dir }}/galaxy.yml.j2 dest={{ playbook_dir }}/galaxy.yml
|
template: src={{ playbook_dir }}/galaxy.yml.j2 dest={{ playbook_dir }}/galaxy.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user