changed name ob webserver role

This commit is contained in:
2025-10-01 14:23:51 +02:00
parent 0318abbfc4
commit 519c7be93d
15 changed files with 0 additions and 0 deletions

View File

@@ -1,11 +0,0 @@
server {
listen 80;
server_name localhost;
location /nginx-status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow ::1;
deny all;
}
}

View File

@@ -1,9 +0,0 @@
- name: restart_nginx
service:
name: "nginx"
state: restarted
- name: restart_snmpd
service:
name: "snmpd"
state: restarted

View File

@@ -1,4 +0,0 @@
- include_tasks: nextcloud/nextcloud.yml
when:
- nextcloud is defined
- nextcloud == True

View File

@@ -1,20 +0,0 @@
- include_vars: nextcloud.yml
- import_tasks: apps/nextcloud/prereq.yml
- name: webserver | nextcloud | get tar ball
uri:
url: "https://download.nextcloud.com/server/releases/latest.zip"
dest: "/tmp/nextcloud_latest.zip"
follow_redirects: all
- name: webserver | nextcloud | extract archive
unarchive:
src: "/tmp/nextcloud_latest.zip"
dest: "/var/www/"
owner: "{{ webuser }}"
group: "{{ webuser }}"
- name: webserver | nextcloud | remove temporary file
file:
path: "/tmp/nextcloud_latest.zip"
state: absent

View File

@@ -1,29 +0,0 @@
- name: webserver | nextcloud | basic tools
package:
state: latest
name:
- ca-certificates
- apt-transport-https
- software-properties-common
- lsb-release
- ca-certificates
when: ansible_distribution in ["Debian", "Ubuntu", "Linux Mint"]
- name: webserver | nextcloud | prereq | get php repo key
uri:
url: "https://packages.sury.org/php/apt.gpg"
dest: "/etc/apt/trusted.gpg.d/php.gpg"
- name: webserver | nextcloud | prereq | add php repo
lineinfile:
path: "/etc/apt/sources.list.d/php.list"
state: present
line: "deb https://packages.sury.org/php/ {{ ansible_distribution_release | lower }} main"
create: True
- name: webserver | nextcloud | prereq | install php
package:
state: latest
name: "{{ item.package }}"
update_cache: True
with_items: "{{ nextcloud_php_packages }}"

View File

@@ -1,26 +0,0 @@
- name: webserver | snmpd | create cache directory
file:
path: "/var/cache/librenms/"
state: directory
owner: "{{ snmpduser | default('root') }}"
- name: webserver | snmpd | install requirement
package:
name: "python3-urllib3"
state: latest
- name: webserver | snmpd | get script
get_url:
url: "https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/apache-stats.py"
dest: "/etc/snmp/apache-stats.py"
mode: "0755"
owner: "root"
group: "root"
- name: webserver | snmpd | configure extend
lineinfile:
path: "{{ snmpd_conf }}"
state: present
line: "extend apache /etc/snmp/apache-stats.py"
insertafter: "# SECTION: custom settings"
notify: restart_snmpd

View File

@@ -1,15 +0,0 @@
- name: webserver | snmpd | get script
get_url:
url: "https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/nginx"
dest: "/etc/snmp/nginx"
mode: "0755"
owner: "root"
group: "root"
- name: webserver | snmpd | configure extend
lineinfile:
path: "{{ snmpd_conf }}"
state: present
line: "extend nginx /etc/snmp/nginx"
insertafter: "# SECTION: custom settings"
notify: restart_snmpd

View File

@@ -1,11 +0,0 @@
- name: webserver | apache | installing apache
package:
name: "{{ apache_package }}"
state: latest
- name: webserver | apache | setup server-statistics
command:
cmd: 'a2enmod status'
creates: '/etc/apache2/mods-enabled/status.conf'
- include_tasks: configure_apache_snmpd.yml

View File

@@ -1,18 +0,0 @@
- name: webserver | nginx | installing nginx
package:
name: "{{ nginx_package }}"
state: latest
- name: webserver | nginx | setup localhost for statistics
copy:
src: "nginx_localhost"
dest: "/etc/nginx/sites-available/localhost"
- name: webserver | nginx | link sites-available to sites-enabled for localhost
file:
path: "/etc/nginx/sites-enabled/localhost"
state: link
src: "/etc/nginx/sites-available/localhost"
notify: restart_nginx
- include_tasks: configure_nginx_snmpd.yml

View File

@@ -1,6 +0,0 @@
- name: webserver | apache | installing php
package:
name:
- php
- php-mysql
state: latest

View File

@@ -1,22 +0,0 @@
# Load distro-specific variables
- include_vars: "{{ ansible_distribution | lower }}.yml"
tags: always
- block:
- debug:
msg: Debug
# install software
- import_tasks: install_apache.yml
when:
- apache is defined
- apache == true
- import_tasks: install_nginx.yml
when:
- nginx is defined
- nginx == true
- import_tasks: install_php.yml
- name: webserver | certbot | install certbot
package:
name: certbot
state: latest
- include_tasks: apps/apps.yml

View File

@@ -1,60 +0,0 @@
<?php
$CONFIG = array (
'instanceid' => '{{ instanceid }}',
'passwordsalt' => '{{ passwordsalt }}',
'trusted_domains' =>
array (
0 => 'tantooine.myfirewall.org',
1 => 'geonosis.universe.local',
2 => 'geonosis',
),
'datadirectory' => '/Daten/owncloud/data/',
'dbtype' => 'mysql',
'version' => '24.0.2.1',
'dbname' => '{{ dbname }}',
'dbhost' => '{{ dbhost }}',
'dbtableprefix' => '{{ dbtableprefix }}',
'dbuser' => '{{ dbuser }}',
'dbpassword' => '{{ dbpassword }}',
'default_phone_region' => 'DE',
'installed' => true,
'theme' => '',
'maintenance' => true,
'secret' => '{{ secret }}',
'ldapIgnoreNamingRules' => false,
'forcessl' => true,
'forceSSLforSubdomains' => true,
'overwrite.cli.url' => 'https://tantooine.myfirewall.org/nextcloud',
'mail_smtpmode' => 'smtp',
'mail_from_address' => '{{ mail_from_address }}',
'mail_domain' => '{{ mail_domain }}',
'mail_smtphost' => '{{ mail_smtphost }}',
'mail_smtpport' => '{{ mail_smtpport }}',
'has_internet_connection' => true,
'updatechecker' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'check_for_working_htaccess' => true,
'loglevel' => 0,
'log_rotate_size' => 104857600,
'trashbin_retention_obligation' => 'auto, auto',
'updater.release.channel' => 'stable',
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
'mail_smtpauthtype' => 'LOGIN',
'integrity.check.disabled' => true,
'redis' =>
array (
'host' => 'localhost',
'port' => '6379',
'timeout' => 1.5,
),
'mysql.utf8mb4' => true,
'app_install_overwrite' =>
array (
0 => 'calendar',
1 => 'tasks',
2 => 'ocsms',
3 => 'files_readmemd',
),
'encryption.legacy_format_support' => false,
'encryption.key_storage_migrated' => false,
);

View File

@@ -1,28 +0,0 @@
apache_package: apache2
nginx_package: nginx
acme_package: acme
webuser: www-data
snmpduser: Debian-snmp
nextcloud_php_packages:
- package: php8.0
- package: libapache2-mod-php8.0
- package: php8.0-fpm
- package: libapache2-mod-fcgid
- package: php8.0-curl
- package: php8.0-gd
- package: php8.0-mbstring
- package: php8.0-xml
- package: php8.0-zip
- package: php8.0-mysql
- package: php8.0-apcu
- package: php8.0-bcmath
- package: php8.0-bz2
- package: php8.0-gmp
- package: php8.0-imagick
- package: php8.0-imap
- package: php8.0-intl
- package: php8.0-ldap
- package: php8.0-memcache
- package: php8.0-redis
- package: php8.0-smbclient

View File

@@ -1,25 +0,0 @@
$ANSIBLE_VAULT;1.1;AES256
63353763353333663663346630323363623938333965663430333035326461363330306131653434
3964343335373832383665396164646261356236643966360a393330386366646337326164373630
32656237343062323836643234396435313636623735663166663766636166393830313336343065
3333643038333839360a306635306434373731336137646232306438656338643233616237623435
32396531366666623232313237643833613334333633646434656331363733373632316331393461
33643430376564326463353337616437613338303839613632653738333563373730323731623638
31656135623966336231353035613732343864303566386233663430666233636162323838656366
36393534313665303766326638373133323964386438656639383030363265393032353761646239
30336366363839326661313839666130356135353134396462646562653561383862623465313437
31303034396662353261663865626565663961393930643763393761346634386639633362313066
66663734613331616632653338666563333734656166333234326639646562623636653434396136
63386434373364633764663162396164643032633133373835383238613732356537323764366463
39643232656662353238376235643537643935366534646363616533633636303831333831353466
66376433353164663130636466303630376434333161353839353863666136386566363334306235
37383938633335663465656539646630613061666231626137393766326237613036303434663064
30616637393863353533303832663032613666353833633933613032303336353139623537363936
30366163666466326334373036393435643436343630366364353133396131336535653435356364
61613330316332383332323732353539396465326538306532353734383033663234623464313934
64386662346364663134613434613036363935636263616264386336663639346135316561623861
61643732393936306332363637373330633735633535356563373037326530343332396263613037
66643136613136643637316266383239643434376461326663666330653338366164656437316431
62393933303466663139653666323737663137656533613439666132663266363238396330663932
37363131343935383665336364323166316439396566313231613530333465613062306439626666
31346165336332313637

View File

@@ -1,28 +0,0 @@
apache_package: apache2
nginx_package: nginx
acme_package: acme
webuser: www-data
snmpduser: Debian-snmp
nextcloud_php_packages:
- package: php8.0
- package: libapache2-mod-php8.0
- package: php8.0-fpm
- package: libapache2-mod-fcgid
- package: php8.0-curl
- package: php8.0-gd
- package: php8.0-mbstring
- package: php8.0-xml
- package: php8.0-zip
- package: php8.0-mysql
- package: php8.0-apcu
- package: php8.0-bcmath
- package: php8.0-bz2
- package: php8.0-gmp
- package: php8.0-imagick
- package: php8.0-imap
- package: php8.0-intl
- package: php8.0-ldap
- package: php8.0-memcache
- package: php8.0-redis
- package: php8.0-smbclient