Skip to content

Commit 75bbd68

Browse files
committed
chore: update ansible-auditship role with new configurations, tasks, and improvements
1 parent 5e499f2 commit 75bbd68

File tree

11 files changed

+34
-32
lines changed

11 files changed

+34
-32
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/home/leucos/dev/sysadmin/ansible-roles/ansible-auditship

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
---
21
name: CI
32

4-
on:
3+
'on':
54
push:
65
branches: [main, master]
76
pull_request:
@@ -62,7 +61,7 @@ jobs:
6261
run: |
6362
python3 -m pip install --upgrade pip
6463
python3 -m pip install ansible molecule molecule-plugins[podman]
65-
64+
6665
- name: Install Podman
6766
run: |
6867
sudo apt-get update
@@ -72,4 +71,4 @@ jobs:
7271
run: molecule test
7372
env:
7473
PY_COLORS: '1'
75-
ANSIBLE_FORCE_COLOR: '1'
74+
ANSIBLE_FORCE_COLOR: '1'

.yamllint

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
extends: default
32

43
rules:
@@ -7,5 +6,11 @@ rules:
76
level: warning
87
comments:
98
min-spaces-from-content: 1
9+
comments-indentation: false
1010
document-start:
11-
present: false
11+
present: false
12+
braces:
13+
max-spaces-inside: 1
14+
octal-values:
15+
forbid-implicit-octal: true
16+
forbid-explicit-octal: true

defaults/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
---
21
auditship_force_install: false

meta/main.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
---
2-
31
dependencies: []
42

53
galaxy_info:
64
author: DevopsWorks
7-
company: DevopsWorks
5+
company: DevopsWorks
86
description: ansible-auditship role (https://gitlab.com/devopsworks/tools/auditship)
97
license: MIT
108
min_ansible_version: "2.4"
119
role_name: auditship
1210
namespace: devopsworks
1311
platforms:
14-
- name: Ubuntu
15-
versions:
16-
- all
17-
- name: Debian
18-
versions:
19-
- all
12+
- name: Ubuntu
13+
versions:
14+
- all
15+
- name: Debian
16+
versions:
17+
- all
2018
galaxy_tags:
21-
- system
19+
- system

molecule/default/converge.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
- name: Converge
32
hosts: all
43
become: true

molecule/default/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
dependency:
32
name: galaxy
43

@@ -54,4 +53,4 @@ scenario:
5453
- side_effect
5554
- verify
5655
- cleanup
57-
- destroy
56+
- destroy

molecule/default/prepare.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
- name: Prepare
32
hosts: all
43
become: true

molecule/default/verify.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
- name: Verify
32
hosts: all
43
become: true
@@ -50,4 +49,4 @@
5049
ansible.builtin.command: /usr/local/bin/auditship -version
5150
register: version_output
5251
changed_when: false
53-
failed_when: version_output.rc != 0
52+
failed_when: version_output.rc != 0

tasks/auditship.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
---
21
- name: Finds latest auditship version
32
ansible.builtin.uri:
43
url: https://gitlab.com/api/v4/projects/71363433/releases
54
status_code:
65
- 200
76
register: __auditship_repo_info
8-
check_mode: no
7+
check_mode: false
98

10-
- ansible.builtin.set_fact:
9+
- name: Set auditship version facts
10+
ansible.builtin.set_fact:
1111
__auditship_latest_version: '{{ __auditship_repo_info.json.0["name"] }}'
1212
__auditship_latest_num_version: '{{ __auditship_repo_info.json.0["name"] | regex_replace("v","") }}'
1313

1414
- name: Fetches latest version
1515
ansible.builtin.get_url:
16-
url: https://gitlab.com/api/v4/projects/71363433/packages/generic/auditship/{{ __auditship_latest_num_version }}/auditship-linux-amd64-{{ __auditship_latest_version }}.gz
16+
url: >
17+
https://gitlab.com/api/v4/projects/71363433/packages/generic/auditship/
18+
{{ __auditship_latest_num_version }}/auditship-linux-amd64-{{ __auditship_latest_version }}.gz
1719
dest: /tmp/auditship.gz
20+
mode: '0644'
1821

1922
- name: Fetch & unarchive auditship
20-
# can not use unachive, does not support gz
23+
# can not use unarchive, does not support gz
2124
ansible.builtin.shell: gunzip -cd /tmp/auditship.gz > /usr/local/bin/auditship && chmod 755 /usr/local/bin/auditship
25+
changed_when: true
2226

2327
- name: Add auditd plugin config
2428
ansible.builtin.template:
@@ -27,12 +31,12 @@
2731
dest: /etc/audit/plugins.d/auditship.conf
2832
owner: root
2933
group: root
30-
mode: 0640
34+
mode: '0640'
3135

3236
- name: Add logrotate config
3337
ansible.builtin.get_url:
3438
url: https://gitlab.com/devopsworks/tools/auditship/-/raw/master/auditship.logrotate.conf?ref_type=heads
3539
dest: /etc/logrotate.d/auditship
3640
owner: root
3741
group: root
38-
mode: 0644
42+
mode: '0644'

0 commit comments

Comments
 (0)