Skip to content

Commit

Permalink
Update Day 15
Browse files Browse the repository at this point in the history
  • Loading branch information
whoami-anoint committed Sep 21, 2023
1 parent 13aa8b5 commit b490faf
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Day 15/5_playbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Practical 5: Security and Compliance

- name: Apply security patches
hosts: target_hosts
tasks:
- name: Update package cache
apt:
update_cache: yes

- name: Upgrade packages
apt:
upgrade: safe

- name: Enforce security configurations
hosts: target_hosts
tasks:
- name: Copy security configuration file
copy:
src: files/security.conf
dest: /etc/security.conf
owner: root
group: root
mode: 0644

- name: Restart service
service:
name: my_service
state: restarted

- name: Perform compliance audits
hosts: target_hosts
tasks:
- name: Run compliance audit script
command: /usr/bin/compliance_audit.sh

0 comments on commit b490faf

Please sign in to comment.