Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify the good handler directly #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Reload {{ cwa_package }}
command: "{{ cwa_agent_ctl }} -a fetch-config -m {{ cwa_agent_mode }} -c file:{{ cwa_agent_config_file }} -s"
notify: Leave a copy of configuration
notify: "Leave {{ cwa_package }} agent {{ 'configuration file from default template' if cwa_use_conf_json_template else 'custom configuration file from file content' }}"
when:
- ansible_virtualization_type != "lxc"
- ansible_virtualization_type != "docker"
Expand Down Expand Up @@ -34,14 +34,10 @@
dest: "{{ cwa_agent_config_file }}"
mode: 0644
force: true
listen: Leave a copy of configuration
when: cwa_use_conf_json_template

# Use custom file from variable
- name: Leave {{ cwa_package }} agent custom configuration file from file content
copy:
content: "{{ cwa_conf_json_file_content | to_nice_json }}"
dest: "{{ cwa_agent_config_file }}"
mode: 0644
listen: Leave a copy of configuration
when: not cwa_use_conf_json_template