Skip to content

Commit 24e97c9

Browse files
committed
Lynis - Update to new GPG installation method
This also requires that gpg be installed first, so we install it if not present.
1 parent 73ebe53 commit 24e97c9

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

roles/lynis/tasks/main.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1+
- name: update and upgrade
2+
become: true
3+
apt:
4+
update_cache: yes
5+
upgrade: yes
6+
7+
- name: install lynis dependencies
8+
become: true
9+
apt:
10+
name: gpg
11+
state: present
12+
113
- name: prepare lynis installation
214
become: true
315
shell: |
4-
wget -O - https://packages.cisofy.com/keys/cisofy-software-public.key | sudo apt-key add -
5-
echo "deb https://packages.cisofy.com/community/lynis/deb/ stable main" | sudo tee /etc/apt/sources.list.d/cisofy-lynis.list
16+
curl -fsSL https://packages.cisofy.com/keys/cisofy-software-public.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/cisofy-software-public.gpg
17+
echo "deb [arch=amd64,arm64 signed-by=/etc/apt/trusted.gpg.d/cisofy-software-public.gpg] https://packages.cisofy.com/community/lynis/deb/ stable main" | sudo tee /etc/apt/sources.list.d/cisofy-lynis.list
618
719
- name: update and upgrade
820
become: true

0 commit comments

Comments
 (0)