ansible/site.yml

56 lines
1.5 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 ]
# Fundamental daemon configuration
- import_playbook: playbooks/zerotier.yml
- import_playbook: playbooks/snmp.yml
- import_playbook: playbooks/nrpe.yml
# Application configuration
- import_playbook: playbooks/db.yml
- import_playbook: playbooks/web.yml
- import_playbook: playbooks/game.yml
- import_playbook: playbooks/pis.yml
- import_playbook: playbooks/pistorage.yml
- import_playbook: playbooks/pik8s.yml
- import_playbook: playbooks/desktop.yml
# Background task configuration
- import_playbook: playbooks/ansible-pull.yml
# Housekeeping
- import_playbook: playbooks/docker-prune.yml