diff --git a/.config/manifest.txt b/.config/manifest.txt index c1ef1da2..685b2d68 100644 --- a/.config/manifest.txt +++ b/.config/manifest.txt @@ -74,8 +74,6 @@ plugins/doc_fragments/ plugins/doc_fragments/eda_controller.py plugins/doc_fragments/__init__.py plugins/modules/ -plugins/modules/activation.py -plugins/modules/activation_info.py plugins/modules/controller_token.py plugins/modules/credential.py plugins/modules/credential_info.py @@ -87,6 +85,8 @@ plugins/modules/event_stream.py plugins/modules/event_stream_info.py plugins/modules/project.py plugins/modules/project_info.py +plugins/modules/rulebook_activation.py +plugins/modules/rulebook_activation_info.py plugins/modules/rulebook_info.py plugins/modules/user.py plugins/modules/__init__.py diff --git a/README.md b/README.md index 62fa38e0..7e8c9a22 100644 --- a/README.md +++ b/README.md @@ -79,21 +79,21 @@ You can either call modules, rulebooks and playbooks by their Fully Qualified Co ```yaml --- - name: Create a rulebook activation - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "Example Activation" description: "Example Activation description" project: "Example Project" rulebook_name: "basic_short.yml" decision_environment_name: "Example Decision Environment" enabled: False - awx_token_id: 1 + awx_token_name: "Example AWX Token" - name: Get information about the rulebook activation - ansible.eda.activation_info: + ansible.eda.rulebook_activation_info: name: "Example Activation" - name: Delete rulebook activation - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "Example Activation" state: absent ``` diff --git a/meta/runtime.yml b/meta/runtime.yml index 97cb3c02..fd43884c 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -18,4 +18,22 @@ action_groups: - project - project_info - rulebook_info + - rulebook_activation + - rulebook_activation_info - user +plugin_routing: + modules: + activation: + redirect: ansible.eda.rulebook_activation + deprecation: + removal_version: 4.0.0 + warning_text: >- + activation has been renamed to rulebook_activation. + Please update your tasks. + activation_info: + redirect: ansible.eda.rulebook_activation_info + deprecation: + removal_version: 4.0.0 + warning_text: >- + activation_info has been renamed to rulebook_activation_info. + Please update your tasks. diff --git a/plugins/modules/activation.py b/plugins/modules/rulebook_activation.py similarity index 99% rename from plugins/modules/activation.py rename to plugins/modules/rulebook_activation.py index e42edbb0..27d73abf 100644 --- a/plugins/modules/activation.py +++ b/plugins/modules/rulebook_activation.py @@ -11,7 +11,7 @@ DOCUMENTATION = """ --- -module: activation +module: rulebook_activation author: - "Nikhil Jain (@jainnikhil30)" - "Alina Buzachis (@alinabuzachis)" @@ -145,7 +145,7 @@ EXAMPLES = """ - name: Create a rulebook activation - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "Example Rulebook Activation" description: "Example Rulebook Activation description" project_name: "Example Project" @@ -155,7 +155,7 @@ awx_token_name: "Example Token" - name: Create a rulebook activation with event_streams option - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "Example Rulebook Activation" description: "Example Activation description" project_name: "Example Project" @@ -169,7 +169,7 @@ source_name: "Sample source" - name: Delete a rulebook activation - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "Example Rulebook Activation" state: absent """ diff --git a/plugins/modules/activation_info.py b/plugins/modules/rulebook_activation_info.py similarity index 96% rename from plugins/modules/activation_info.py rename to plugins/modules/rulebook_activation_info.py index fb64fe5a..2572327d 100644 --- a/plugins/modules/activation_info.py +++ b/plugins/modules/rulebook_activation_info.py @@ -11,7 +11,7 @@ DOCUMENTATION = """ --- -module: activation_info +module: rulebook_activation_info author: - Alina Buzachis (@alinabuzachis) short_description: List rulebook activations in the EDA Controller @@ -31,11 +31,11 @@ EXAMPLES = """ - name: Get information about a rulebook activation - ansible.eda.activation_info: + ansible.eda.rulebook_activation_info: name: "Example Rulebook Activation" - name: List all rulebook activations - ansible.eda.activation_info: + ansible.eda.rulebook_activation_info: """ diff --git a/tests/integration/targets/activation/tasks/main.yml b/tests/integration/targets/activation/tasks/main.yml index 00f67f4c..1ce0be92 100644 --- a/tests/integration/targets/activation/tasks/main.yml +++ b/tests/integration/targets/activation/tasks/main.yml @@ -138,7 +138,7 @@ register: decision_environment_creation - name: Create a new rulebook activation in check mode - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "{{ activation_name }}" description: "Example Activation description" project_name: "{{ project_name }}" @@ -156,7 +156,7 @@ - _result.changed - name: Create a new rulebook activation - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "{{ activation_name }}" description: "Example Activation description" project_name: "{{ project_name }}" @@ -173,7 +173,7 @@ - _result.changed - name: Create a new rulebook activation again - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "{{ activation_name }}" description: "Example Activation description" project_name: "{{ project_name }}" @@ -191,19 +191,19 @@ - "'A rulebook activation with name: ' + activation_name + ' already exists. The module does not support modifying a rulebook activation.' in _result.msg" - name: Get information about the rulebook activation - ansible.eda.activation_info: + ansible.eda.rulebook_activation_info: name: "{{ activation_name }}" - name: List all the rulebook activations - ansible.eda.activation_info: + ansible.eda.rulebook_activation_info: - name: Delete rulebook activation - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "{{ activation_name }}" state: absent - name: Get information about the rulebook activation - ansible.eda.activation_info: + ansible.eda.rulebook_activation_info: name: "{{ activation_name }}" # Test event_streams option @@ -235,7 +235,7 @@ register: _result_rulebook_info - name: Create a rulebook activation (wrong source_name) - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "{{ activation_name_wrong_source }}" description: "Example Activation description" project_name: "{{ project_name }}" @@ -257,7 +257,7 @@ - '"The specified source_name Test source name does not exist." in _result.msg' - name: Create a rulebook activation - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "{{ activation_name_source_index }}" description: "Example Activation description" project_name: "{{ project_name }}" @@ -277,7 +277,7 @@ - _result.changed - name: Get information about the rulebook activation - ansible.eda.activation_info: + ansible.eda.rulebook_activation_info: name: "{{ activation_name_source_index }}" register: _result_activation_info @@ -291,12 +291,12 @@ - event_stream_name in (source_mappings_dict | map(attribute='event_stream_name') | list) - name: Delete rulebook activation - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "{{ activation_name_source_index }}" state: absent - name: Create a new rulebook activation - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "{{ activation_name_source_name }}" description: "Example Activation description" project_name: "{{ project_name }}" @@ -316,7 +316,7 @@ - _result.changed - name: Get information about the rulebook activation - ansible.eda.activation_info: + ansible.eda.rulebook_activation_info: name: "{{ activation_name_source_name }}" register: _result_activation_info @@ -354,7 +354,7 @@ - credential_deletion is success - name: Delete rulebook activation - ansible.eda.activation: + ansible.eda.rulebook_activation: name: "{{ activation_name }}" state: absent @@ -371,8 +371,8 @@ state: absent ignore_errors: true - - name: Delete rulebook activations - ansible.eda.activation: + - name: Delete rulebook activation + ansible.eda.rulebook_activation: name: "{{ item }}" state: absent loop: