oopen-server/roles/common/tasks/main.yml
2025-02-14 11:36:24 +01:00

307 lines
5.8 KiB
YAML

---
- import_tasks: show.yml
tags:
- show
# tags supported inside basic.yml
#
# timezone
# locales
# systemd-nofiles
- import_tasks: basic.yml
tags:
- basic
# tags supported inside apt.yml
#
# apt-update
# apt-upgrade
# apt-dpkg-configure
# apt-initial-install
# apt-microcode
# apt-compiler-pkgs
# apt-webserver-pkgs
# apt-lxc-hosts-pkgs
# apt-mysql-server-pkgs
# apt-postgresql-server-pkgs
# apt-remove
# apt-autoremove
# apt-clean
- import_tasks: apt.yml
when:
- ansible_facts['distribution'] == "Debian"
tags: apt
# tags supported inside apt-gateway.yml:
#
#
- import_tasks: apt-gateway.yml
when: inventory_hostname in groups['gateway_server']
tags:
- apt
- apt-gateway-server
#
# yum-update
# yum-base-install
# yum-initial-install
- import_tasks: yum.yml
when:
- ansible_os_family == "RedHat"
- ansible_distribution == "CentOS" or ansible_distribution == "Fedora"
tags: yum
# tags supported inside systemd-resolved.yml
#
# systemd-resolved
- import_tasks: systemd-resolved.yml
tags:
- systemd-resolved
when:
- ansible_facts['distribution'] == "Debian"
- ansible_facts['distribution_major_version'] > "11"
- systemd_resolved is defined and systemd_resolved|bool
- import_tasks: tor.yml
when:
- inventory_hostname in groups['mail_server']
- ansible_facts['distribution'] == "Debian"
tags:
- tor-service
- import_tasks: cron.yml
tags:
- cron
# tags supported inside shell.yml
#
# vim-config
# zsh-config
#
- import_tasks: shell.yml
when:
- ansible_facts['distribution'] == "Debian"
tags:
- shell-config
- vim-config
- zsh-config
# tags supported inside users.yml:
#
# users-exists
# groups-exists
# authorized_key
# sudo-users
# insert-ssh-keypair-backup-server
# keypair-backup-server
# root-defaut-ssh-keypair
# insert_root_ssh_public_key
- import_tasks: users.yml
tags:
- users
# tags supported inside users-systemfiles.yml:
#
# bash
# profile
# vim
- import_tasks: users-systemfiles.yml
tags:
- users
- users-systemfiles
# tags supported inside webadmin-user.yml:
#
# users-exists
# groups-exists
# authorized_key
# sudo-users
# webadmin-defaut-ssh-keypair
# insert_webadmin_ssh_public_key
- import_tasks: webadmin-user.yml
when: groups['webadmin']|string is search(inventory_hostname)
tags:
- users
- users-systemfiles
- webadmin
# tags supported inside sshd.yml
#
# sshd-config
- import_tasks: sshd.yml
tags: sshd
# tags supported inside sudoers.yml:
#
# sudoers-remove
# sudoers-file-configuration
# sudoers-global-configuration
- import_tasks: sudoers.yml
tags: sudoers
- import_tasks: motd.yml
tags: motd
# tags supported inside ntp.yml:
#
# ntp-server
- import_tasks: ntp.yml
tags:
- ntp
# tags supportetd inside git.yml
#
# git-firewall-repository
# git-default-repositories
# git-oopen-server-repositories
# git-warenform-server-repositories
# git-lxc-host-repositories
# git-lxc-guest-repositories
# git-gateway-server-repositories
# git-apache2-repositories
# git-nginx-repositories
# git-mysql-server-repositories
# git-nextcloud-server-repositories
# git-postgresql-server-repositories
# git-dns-server-repositories
# git-backup-server-repositories
# git-mailservers-repositories
# git-sympa-repositories
# git-other-repositories
- import_tasks: git.yml
tags: git
# tags supported inside nfs.yml:
#
# nfs-server
# nfs-client
- import_tasks: nfs.yml
tags:
- nfs
# tags supported inside x2go-server.yml:
#
# x2go-server
- import_tasks: x2go-server.yml
when: inventory_hostname in groups['x2go_server']
tags:
- x2go
# tags supported inside copy_files.yml:
#
# copy-files
# copy-plain-files
# copy-template-files
- import_tasks: copy_files.yml
tags:
- copy-files
# tags supported inside symlink_files.yml:
#
# symlink-files
- import_tasks: symlink_files.yml
tags:
- symlink-files
# tags supported inside config_files_mailsystem_scripts.yml:
#
- import_tasks: config_files_mailsystem_scripts.yml
tags:
- config-files-mailsystem
# tags supported inside samba-user.yml:
#
# samba-server
# samba-user
# system-user
#
- import_tasks: samba-user.yml
when: inventory_hostname in groups['samba_server']
tags:
- samba-server
# tags supported inside samba-config-server.yml:
#
# samba-server
# samba-shares
# samba-server
# samba-cron
#
- import_tasks: samba-config-server.yml
when: inventory_hostname in groups['samba_server']
tags:
- samba-server
# tags supported inside samba-remove-user.yml:
#
# samba-server
# samba-user
# system-user
#
- import_tasks: samba-remove-user.yml
when: inventory_hostname in groups['samba_server']
tags:
- samba-server
- remove-samba-user
- import_tasks: redis-server.yml
when: inventory_hostname in groups['nextcloud_server'] or
inventory_hostname in groups['apache2_webserver'] or
inventory_hostname in groups['nginx_webserver']
tags:
- redis-server
# tags supportetd inside caching-nameserver.yml
#
# apt-caching-nameserver
# yum-caching-nameserver
#
- import_tasks: caching-nameserver.yml
when: groups['caching_nameserver']|string is search(inventory_hostname)
tags: caching-nameserver
- import_tasks: mysql.yml
when: groups['mysql_server']|string is search(inventory_hostname)
tags:
- mysql
- mariadb
- import_tasks: apache2.yml
when: groups['apache2_webserver']|string is search(inventory_hostname)
tags:
- apache2
- import_tasks: systemd-services_debian_based_OS.yml
when:
- ansible_os_family == "Debian"
tags:
- services
- import_tasks: systemd-services_redhat_based_OS.yml
when:
- ansible_os_family == "RedHat"
tags:
- services