ansible/site.yml

59 lines
1.7 KiB
YAML
Executable File

#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
# Preambulatory system configuration
- hosts: all
tasks:
- name: collect service facts
service_facts:
tags: [ always ]
roles:
- role: common
tags: [ common ]
- role: adminuser
tags: [ adminuser, common ]
- role: docker
tags: [ docker, common, skip-pull ]
- role: motd
vars:
motd_watch_services_extra:
- apache2
- docker
- kubelet
- php7.4-fpm
- postgresql
tags: [ motd, common ]
- role: sshd
vars:
sshd:
AcceptEnv: "LANG LC_*"
ChallengeResponseAuthentication: no
Compression: yes
PasswordAuthentication: no
PermitRootLogin: no
PrintMotd: no
PubkeyAuthentication: yes
Subsystem: "sftp /usr/lib/openssh/sftp-server"
UsePAM: yes
X11Forwarding: no
tags: [ sshd, common ]
# Manufacturer configuration
- import_playbook: playbooks/manufacturers_raspi.yml
- import_playbook: playbooks/manufacturers_s76.yml
# Tags for fundamental services
- import_playbook: playbooks/tags_zerotier.yml
- import_playbook: playbooks/tags_snmp.yml
- import_playbook: playbooks/tags_nagios-nrpe.yml
# Device roles
- import_playbook: playbooks/device_roles_pik8s-storage.yml
- import_playbook: playbooks/device_roles_pik8s.yml
- import_playbook: playbooks/device_roles_workstation.yml
# Production configuration
- import_playbook: playbooks/prod_db.yml
- import_playbook: playbooks/prod_web.yml
- import_playbook: playbooks/prod_game.yml
# Supplementary tags
- import_playbook: playbooks/tags_ansible-pull.yml
# Housekeeping tags for one-off tasks
- import_playbook: playbooks/tags_docker-prune.yml