Skip to content

Commit

Permalink
Merge branch 'main' into hostname_sanitise
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Izquierdo authored Jan 17, 2025
2 parents 612fc7b + b395b94 commit 15abc44
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace: ansible
name: eda

# The version of the collection. Must be compatible with semantic versioning
version: 2.2.0
version: 2.3.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/rulebook_activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,13 @@ def create_params(
if module.params.get("restart_policy"):
activation_params["restart_policy"] = module.params["restart_policy"]

if module.params.get("enabled"):
if module.params.get("enabled") is not None:
activation_params["is_enabled"] = module.params["enabled"]

if not is_aap_24 and module.params.get("log_level"):
activation_params["log_level"] = module.params["log_level"]

if not is_aap_24 and module.params.get("swap_single_source"):
if not is_aap_24 and module.params.get("swap_single_source") is not None:
activation_params["swap_single_source"] = module.params["swap_single_source"]

return activation_params
Expand Down
7 changes: 7 additions & 0 deletions tests/integration/targets/activation/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@
- name: Get information about the rulebook activation
ansible.eda.rulebook_activation_info:
name: "{{ activation_name }}"
register: _result_activation_info

- name: Assert that rulebook activation is disabled
ansible.builtin.assert:
that:
- not _result_activation_info.activations[0].is_enabled

- name: List all the rulebook activations
ansible.eda.rulebook_activation_info:
Expand Down Expand Up @@ -380,6 +386,7 @@
enabled: False
awx_token_name: "{{ awx_token_name }}"
organization_name: Default
swap_single_source: False
event_streams:
- event_stream: "{{ event_stream_name }}"
source_name: "{{ _result_rulebook_info.rulebooks[0].sources[0].name }}"
Expand Down

0 comments on commit 15abc44

Please sign in to comment.