First real commit after test

This commit is contained in:
2023-09-23 18:16:40 +02:00
parent 134f895212
commit ccabfe9b03
14 changed files with 637 additions and 0 deletions

43
all.yml Normal file
View File

@@ -0,0 +1,43 @@
---
- name: Main playbook for common services
hosts: all
become: true
# #
# # @author Stéphane Gratias (2023).
# #
pre_tasks:
- name: >-
Show target servers -> Hostname : OS - IP
debug:
msg: "{{ ansible_hostname }} : {{ ansible_distribution }} {{ ansible_distribution_version }} - {{ ansible_default_ipv4.address }}"
tags:
- always
- test
- name: Ensure specified repository packages are into sources list
ansible.builtin.apt_repository:
repo: "{{ item }}"
state: present
loop: "{{ apt_repositories_sources }}"
tags:
- repo
roles:
- { role: grog.management-user, tags: user }
- { role: willshersystems.sshd, tags: ssh }
- { role: claranet.apt, tags: apt }
- { role: robertdebock.fail2ban, tags: ban }
- { role: ome.rsync_server, tags: rsync }
tasks:
# - name: Show ssh backup
# debug:
# msg: "{{ ssh_backup }}"
# tags:
# - always
# - test