Skip to content

Commit

Permalink
Cleanup /var/log/messages in image build
Browse files Browse the repository at this point in the history
  • Loading branch information
dergeberl committed Jul 25, 2024
1 parent fca049c commit f8d1fae
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions image/install-alpine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,18 @@
- name: disable ssh service
command: "rc-update del sshd"

- name: cleanup
- name: cleanup apk cache
command: "rm -rf /var/cache/apk/*"

- name: more cleanup
- name: cleanup cloud-init
command: "cloud-init clean -l -s"

- name: cleanup messages
lineinfile:
path: /var/log/messages
state: absent
regexp: '.*'

- name: cleanup ssh-keys
lineinfile:
path: /home/alpine/.ssh/authorized_keys
Expand Down

0 comments on commit f8d1fae

Please sign in to comment.