Skip to content

Commit c99c322

Browse files
author
Greg Malkov
authored
Amazon2 tweaks (#48)
* account for different amazon2 syntax * cleanup * kill auditd on Amazon
1 parent f0d4278 commit c99c322

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

tasks/disable_auditd.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
- name: check auditd status
3+
command: service auditd status
4+
register: auditd_status
5+
ignore_errors: true
6+
changed_when: false
7+
8+
- name: Stop service auditd
9+
command: service auditd stop
10+
when: auditd_status.rc == 0
11+
12+
- name: Disable service auditd
13+
command: systemctl disable auditd
14+
when: auditd_status.rc == 0

tasks/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
include: pkg_url.yml
77
when: threatstack_pkg_url is undefined
88

9+
- name: Disable auditd service
10+
include: disable_auditd.yml
11+
when: ansible_distribution == 'Amazon'
12+
913
- name: Run Apt configure and install Threat Stack
1014
include: apt_install.yml
1115
when: ansible_os_family == 'Debian'

tasks/tsagent_setup.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
set_fact:
2828
config_checksum: "{{ config_string | checksum }}"
2929

30-
- debug:
31-
msg: "{{ threatstack_agent_config_args }}"
32-
3330
- name: Create file to track checksum of config string
3431
copy:
3532
content: "{{ config_checksum }}"

templates/threatstack.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name=Threat Stack Package Repository
33
{% if ansible_distribution == 'Amazon' %}
44
{% if threatstack_v1 %}
55
baseurl={{threatstack_pkg_url}}/Amazon
6-
{% elif ansible_distribution_version == '2' %}
6+
{% elif ansible_distribution_version == '2' or ansible_kernel is search("\.amzn2\.") %}
77
baseurl={{threatstack_pkg_url}}/Amazon/2
88
{% else %}
99
baseurl={{threatstack_pkg_url}}/Amazon/1

0 commit comments

Comments
 (0)