Skip to content

Commit

Permalink
Amazon2 tweaks (#48)
Browse files Browse the repository at this point in the history
* account for different amazon2 syntax

* cleanup

* kill auditd on Amazon
  • Loading branch information
Greg Malkov authored Feb 8, 2019
1 parent f0d4278 commit c99c322
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
14 changes: 14 additions & 0 deletions tasks/disable_auditd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- name: check auditd status
command: service auditd status
register: auditd_status
ignore_errors: true
changed_when: false

- name: Stop service auditd
command: service auditd stop
when: auditd_status.rc == 0

- name: Disable service auditd
command: systemctl disable auditd
when: auditd_status.rc == 0
4 changes: 4 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
include: pkg_url.yml
when: threatstack_pkg_url is undefined

- name: Disable auditd service
include: disable_auditd.yml
when: ansible_distribution == 'Amazon'

- name: Run Apt configure and install Threat Stack
include: apt_install.yml
when: ansible_os_family == 'Debian'
Expand Down
3 changes: 0 additions & 3 deletions tasks/tsagent_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
set_fact:
config_checksum: "{{ config_string | checksum }}"

- debug:
msg: "{{ threatstack_agent_config_args }}"

- name: Create file to track checksum of config string
copy:
content: "{{ config_checksum }}"
Expand Down
2 changes: 1 addition & 1 deletion templates/threatstack.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name=Threat Stack Package Repository
{% if ansible_distribution == 'Amazon' %}
{% if threatstack_v1 %}
baseurl={{threatstack_pkg_url}}/Amazon
{% elif ansible_distribution_version == '2' %}
{% elif ansible_distribution_version == '2' or ansible_kernel is search("\.amzn2\.") %}
baseurl={{threatstack_pkg_url}}/Amazon/2
{% else %}
baseurl={{threatstack_pkg_url}}/Amazon/1
Expand Down

0 comments on commit c99c322

Please sign in to comment.