changed role to webservers due to conflicting with hostnames
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
- include_tasks: nextcloud/nextcloud.yml
|
||||
when:
|
||||
- nextcloud is defined
|
||||
- nextcloud == True
|
||||
@@ -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
|
||||
@@ -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 }}"
|
||||
@@ -1,26 +0,0 @@
|
||||
- name: webserver | snmpd | create cache directory
|
||||
file:
|
||||
path: "/var/cache/librenms/"
|
||||
state: directory
|
||||
owner: "{{ snmp-user | 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
|
||||
@@ -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
|
||||
@@ -1,12 +0,0 @@
|
||||
- name: webserver | apache | installing apache
|
||||
package:
|
||||
name: "{{ apache_package }}"
|
||||
state: latest
|
||||
|
||||
- name: webserver | apache | setup server-statistics
|
||||
command:
|
||||
free_form: # not required. The command module takes a free form command to run. There is no actual parameter named 'free form'.
|
||||
cmd: 'a2enmod status'
|
||||
creates: '/etc/apache2/mods-enabled/status.conf'
|
||||
|
||||
- include_tasks: configure_apache_snmpd.yml
|
||||
@@ -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
|
||||
@@ -1,6 +0,0 @@
|
||||
- name: webserver | apache | installing php
|
||||
package:
|
||||
name:
|
||||
- php
|
||||
- php-mysql
|
||||
state: latest
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user