mirror of
https://github.com/ansible/awx.git
synced 2026-03-17 08:57:33 -02:30
New target for sanity testing of the collection
Do not run in Zuul
This commit is contained in:
17
awx_collection/make_imports_absolute.yml
Normal file
17
awx_collection/make_imports_absolute.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
connection: local
|
||||
|
||||
tasks:
|
||||
- name: Find all module files
|
||||
find:
|
||||
paths: "{{ playbook_dir }}/plugins/modules"
|
||||
patterns: "*.py"
|
||||
register: module_files
|
||||
|
||||
- name: Change module_utils imports to absolute namespace and package names
|
||||
replace:
|
||||
path: "{{ item.path }}"
|
||||
regexp: '^from ..module_utils.ansible_tower'
|
||||
replace: 'from ansible_collections.awx.awx.plugins.module_utils.ansible_tower'
|
||||
with_items: "{{ module_files.files }}"
|
||||
Reference in New Issue
Block a user