Skip to content

Commit

Permalink
chore: fix lint issues and include tests config in collection tarball
Browse files Browse the repository at this point in the history
Signed-off-by: Alex <[email protected]>
  • Loading branch information
Alex-Izquierdo committed Sep 18, 2024
1 parent 139f534 commit 52f72a6
Showing 12 changed files with 64 additions and 63 deletions.
1 change: 1 addition & 0 deletions .config/manifest.txt
Original file line number Diff line number Diff line change
@@ -106,5 +106,6 @@ schemas/event/range.json
schemas/event/README.md
schemas/README.md
tests/
tests/config.yml
tests/integration/
tests/__init__.py
15 changes: 8 additions & 7 deletions examples/eda-setup.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Example playbook that demonstrates how to use the Ansible EDA collection to perform a basic setup.

- hosts: localhost
- name: Example playbook for Ansible EDA collection
hosts: localhost
connection: local
gather_facts: no
gather_facts: false
vars:
controller_host: your eda controller url, e.g. https://eda-controller.example.com
controller_username: your eda controller username
@@ -15,7 +16,7 @@
quay_password: your quay.io password

organization_name: Default
validate_certs: no
validate_certs: false
module_defaults:
group/ansible.eda.eda:
controller_host: "{{ controller_host }}"
@@ -88,17 +89,17 @@
name: basic event stream

- name: Print the event stream url
debug:
ansible.builtin.debug:
msg: "Event Stream URL: {{ event_stream_data.event_streams[0].url }}"

- name: Remove the activation if it exists
ansible.eda.activation:
ansible.eda.rulebook_activation:
organization_name: "{{ organization_name }}"
name: activation-example
state: absent

- name: Activate a rulebook
ansible.eda.activation:
ansible.eda.rulebook_activation:
organization_name: "{{ organization_name }}"
decision_environment_name: upstream decision environment
project_name: test project
@@ -112,5 +113,5 @@
until: activation_status.activations | length > 0 and activation_status.activations[0].status == "running"
retries: 30
delay: 2
ansible.eda.activation_info:
ansible.eda.rulebook_activation_info:
name: activation-example
1 change: 0 additions & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -96,7 +96,6 @@ build_ignore:
- pyproject.toml
- run_pytest.yml
- start_app.yml
- tests/config.yml
- tests/conftest.py
- tests/integration/*
- tests/run-staging
16 changes: 8 additions & 8 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -26,14 +26,14 @@ plugin_routing:
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.
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.
removal_version: 4.0.0
warning_text: >-
activation_info has been renamed to rulebook_activation_info.
Please update your tasks.
10 changes: 5 additions & 5 deletions plugins/modules/credential_info.py
Original file line number Diff line number Diff line change
@@ -32,12 +32,12 @@


EXAMPLES = """
- name: Get information about a credential
ansible.eda.credential_info:
name: "Test"
- name: Get information about a credential
ansible.eda.credential_info:
name: "Test"
- name: List all credentials
ansible.eda.credential_info:
- name: List all credentials
ansible.eda.credential_info:
"""


36 changes: 18 additions & 18 deletions plugins/modules/credential_type.py
Original file line number Diff line number Diff line change
@@ -54,24 +54,24 @@


EXAMPLES = """
- name: Create a credential type
ansible.eda.credential_type:
name: "Test"
state: present
description: "A test credential type"
inputs:
fields:
- id: "Field1"
type: "string"
label: "Label1"
injectors:
extra_vars:
field1: "field1"
- name: Delete a credential type
ansible.eda.credential_type:
name: "Test"
state: absent
- name: Create a credential type
ansible.eda.credential_type:
name: "Test"
state: present
description: "A test credential type"
inputs:
fields:
- id: "Field1"
type: "string"
label: "Label1"
injectors:
extra_vars:
field1: "field1"
- name: Delete a credential type
ansible.eda.credential_type:
name: "Test"
state: absent
"""


10 changes: 5 additions & 5 deletions plugins/modules/credential_type_info.py
Original file line number Diff line number Diff line change
@@ -32,12 +32,12 @@


EXAMPLES = """
- name: Get information about a credential type
ansible.eda.credential_type_info:
name: "Test"
- name: Get information about a credential type
ansible.eda.credential_type_info:
name: "Test"
- name: List all credential types
ansible.eda.credential_type_info:
- name: List all credential types
ansible.eda.credential_type_info:
"""


10 changes: 5 additions & 5 deletions plugins/modules/event_stream_info.py
Original file line number Diff line number Diff line change
@@ -32,12 +32,12 @@


EXAMPLES = r"""
- name: Get information about a event stream
ansible.eda.event_stream_info:
name: "Test"
- name: Get information about a event stream
ansible.eda.event_stream_info:
name: "Test"
- name: List all event streams
ansible.eda.event_stream_info:
- name: List all event streams
ansible.eda.event_stream_info:
"""


4 changes: 2 additions & 2 deletions plugins/modules/rulebook_activation.py
Original file line number Diff line number Diff line change
@@ -151,7 +151,7 @@
project_name: "Example Project"
rulebook_name: "hello_controller.yml"
decision_environment_name: "Example Decision Environment"
enabled: False
enabled: false
awx_token_name: "Example Token"
- name: Create a rulebook activation with event_streams option
@@ -161,7 +161,7 @@
project_name: "Example Project"
rulebook_name: "hello_controller.yml"
decision_environment_name: "Example Decision Environment"
enabled: False
enabled: false
awx_token_name: "Example Token"
organization_name: "Default"
event_streams:
10 changes: 5 additions & 5 deletions plugins/modules/rulebook_activation_info.py
Original file line number Diff line number Diff line change
@@ -30,12 +30,12 @@


EXAMPLES = """
- name: Get information about a rulebook activation
ansible.eda.rulebook_activation_info:
name: "Example Rulebook Activation"
- name: Get information about a rulebook activation
ansible.eda.rulebook_activation_info:
name: "Example Rulebook Activation"
- name: List all rulebook activations
ansible.eda.rulebook_activation_info:
- name: List all rulebook activations
ansible.eda.rulebook_activation_info:
"""


12 changes: 6 additions & 6 deletions plugins/modules/rulebook_info.py
Original file line number Diff line number Diff line change
@@ -39,13 +39,13 @@


EXAMPLES = """
- name: Get information about a rulebook
ansible.eda.rulebook_info:
name: "Example Rulebook Activation"
project_name: "Example Project"
- name: Get information about a rulebook
ansible.eda.rulebook_info:
name: "Example Rulebook Activation"
project_name: "Example Project"
- name: List all rulebooks
ansible.eda.rulebook_info:
- name: List all rulebooks
ansible.eda.rulebook_info:
"""


2 changes: 1 addition & 1 deletion plugins/modules/user.py
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@
last_name: "Test Collection User"
email: "[email protected]"
password: "test"
is_superuser: True
is_superuser: true
state: present
no_log: true

0 comments on commit 52f72a6

Please sign in to comment.