1.2 KiB
1.2 KiB
Ansible MicroOS VM setup
- Install devsec hardening collection
ansible-galaxy collection install devsec.hardening
- Create the inventory.txt file for the server
- Run the hardening playbook. Does not run completely through because of MicroOS immutability. At some point, a PR properly supporting MicroOS could be opened to https://github.com/dev-sec/ansible-os-hardening
ansible-playbook -i inventory.txt hardening.yml
- Run the custom_hardening playbook. This mostly sets SSH parameters to best practice values.
ansible-playbook -i inventory.txt custom_hardening.yml
- Run the allow_privileged_ports_rootless playbook. This allows a rootless traefik container to use ports 80 and 443.
ansible-playbook -i inventory.txt allow_privileged_ports_rootless.yml
- Run the deploy_services playbook. This creates groups and users for each service, creates a btrfs subvolume for data and copies the quadlet files to the correct location, then activates the service.
ansible-playbook -i inventory.txt deploy_services.yml
- Run the deploy_traefik_config playbool. This copies the traefik configuration to the correct location.
ansible-playbook -i inventory.txt deploy_traefik_config.yml