forked from cbdr/al-agents-ansible-playbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linter fixes - bump min ansible to 2.9 to have fqcn builtin tasks.
- Loading branch information
Showing
13 changed files
with
41 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
--- | ||
|
||
- name: Set Linux optional configs facts | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
al_agent_configure_options: "" | ||
|
||
- name: Set Linux optional configs fact for using proxy | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
al_agent_configure_options: "{{ al_agent_configure_options }} --proxy {{ al_agent_proxy_url }}" | ||
when: al_agent_proxy_url is defined | ||
|
||
- name: Set Linux optional configs fact for egress host and port | ||
set_fact: al_agent_configure_options="{{ al_agent_configure_options }} | ||
ansible.builtin.set_fact: al_agent_configure_options="{{ al_agent_configure_options }} | ||
--host {{ al_agent_egress_host }} | ||
--port {{ al_agent_egress_port }}" | ||
when: al_agent_egress_port is defined and al_agent_egress_host is defined | ||
|
||
- name: Set Linux optional configs fact for egress host only | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
al_agent_configure_options: "{{ al_agent_configure_options }} --host {{ al_agent_egress_host }}" | ||
when: al_agent_egress_port is defined and al_agent_egress_host is not defined | ||
|
||
- name: Configure Alert Logic Agent (optional) | ||
command: "/etc/init.d/al-agent configure {{ al_agent_configure_options }}" | ||
ansible.builtin.command: "/etc/init.d/al-agent configure {{ al_agent_configure_options }}" | ||
tags: configure_al_agent | ||
when: not agent_provisioned.stat.exists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
--- | ||
|
||
- name: Set Linux optional facts | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
al_agent_provision_options: [] | ||
|
||
- name: Set Linux optional fact for using a registration key | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
al_agent_provision_options: "{{ al_agent_provision_options + [ \"--key \" + al_agent_registration_key ] }}" | ||
when: al_agent_registration_key is defined and al_agent_registration_key != "your_registration_key_here" | ||
|
||
- name: Provision Alert Logic Agent | ||
command: "/etc/init.d/al-agent provision {{ al_agent_provision_options | join(' ') }}" | ||
ansible.builtin.command: "/etc/init.d/al-agent provision {{ al_agent_provision_options | join(' ') }}" | ||
notify: | ||
- restart al-agent | ||
tags: provision_al_agent | ||
when: not al_agent_for_imaging and not agent_provisioned.stat.exists and al_agent_provision_options != "[]" | ||
|
||
- name: Provision Alert Logic Agent - for Imaging | ||
command: "/etc/init.d/al-agent provision {{ al_agent_provision_options | join(' ') }}" | ||
ansible.builtin.command: "/etc/init.d/al-agent provision {{ al_agent_provision_options | join(' ') }}" | ||
tags: provision_al_agent | ||
when: al_agent_for_imaging and not agent_provisioned.stat.exists and al_agent_provision_options != "[]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
--- | ||
|
||
al_agent_initscript: 'rsyslog' | ||
al_agent_pkg_name_arch: "{{ ansible_architecture }}" | ||
al_agent_pkg_name_ext: 'rpm' | ||
al_agent_syslog_ng_source: "{{ ( ansible_distribution_major_version >= '6' ) | ternary('s_all', 's_sys') }}" | ||
al_agent_base_url: 'https://scc.alertlogic.net' | ||
al_agent_pkg_name_prefix: 'al-agent-LATEST-1.' | ||
al_agent_pkg_url: "{{ al_agent_base_url }}/software/{{ al_agent_pkg_name_prefix }}{{al_agent_pkg_name_arch}}.{{al_agent_pkg_name_ext}}" | ||
al_agent_pkg_url: "{{ al_agent_base_url }}/software/{{ al_agent_pkg_name_prefix }}{{al_agent_pkg_name_arch}}.{{al_agent_pkg_name_ext}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
--- | ||
|
||
### Uncomment for global or place in group/host vars for granular control ### | ||
# al_agent_registration_key: 'your_registration_key_here' | ||
### Uncomment the following when configuring optionals ### | ||
# al_agent_egress_port: '443' | ||
# al_agent_egress_host: '' | ||
# al_agent_proxy_url: '' | ||
al_agent_for_imaging: False | ||
al_agent_for_imaging: false |