Proxy nginx + torrent client
This commit is contained in:
4
roles/docker_spin_up/tasks/email.yml
Normal file
4
roles/docker_spin_up/tasks/email.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
- name: email
|
||||
community.docker.docker_container:
|
||||
|
||||
15
roles/docker_spin_up/tasks/nginx.yml
Normal file
15
roles/docker_spin_up/tasks/nginx.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: nginx
|
||||
community.docker.docker_container:
|
||||
name: nginx
|
||||
image: 'jc21/nginx-proxy-manager:latest'
|
||||
restart_policy: unless-stopped
|
||||
ports:
|
||||
- '80:80'
|
||||
- '81:81'
|
||||
- '443:443'
|
||||
volumes:
|
||||
- "{{ docker_homepath }}/data:/data"
|
||||
- "{{ docker_homepath }}/letsencrypt:/etc/letsencrypt"
|
||||
networks:
|
||||
- name: http
|
||||
0
roles/docker_spin_up/tasks/pi-hole.yml
Normal file
0
roles/docker_spin_up/tasks/pi-hole.yml
Normal file
29
roles/mariaDB_install/.travis.yml
Normal file
29
roles/mariaDB_install/.travis.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
language: python
|
||||
python: "2.7"
|
||||
|
||||
# Use the new container infrastructure
|
||||
sudo: false
|
||||
|
||||
# Install ansible
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- python-pip
|
||||
|
||||
install:
|
||||
# Install ansible
|
||||
- pip install ansible
|
||||
|
||||
# Check ansible version
|
||||
- ansible --version
|
||||
|
||||
# Create ansible.cfg with correct roles_path
|
||||
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
||||
|
||||
script:
|
||||
# Basic role syntax check
|
||||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
38
roles/mariaDB_install/README.md
Normal file
38
roles/mariaDB_install/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||||
2
roles/mariaDB_install/defaults/main.yml
Normal file
2
roles/mariaDB_install/defaults/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# defaults file for mariaDB_install
|
||||
6
roles/mariaDB_install/handlers/main.yml
Normal file
6
roles/mariaDB_install/handlers/main.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
# handlers file for mariaDB_install
|
||||
- name: mariadb restart
|
||||
service:
|
||||
name: mariadb
|
||||
state: restarted
|
||||
52
roles/mariaDB_install/meta/main.yml
Normal file
52
roles/mariaDB_install/meta/main.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description: your role description
|
||||
company: your company (optional)
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||
# - BSD-3-Clause (default)
|
||||
# - MIT
|
||||
# - GPL-2.0-or-later
|
||||
# - GPL-3.0-only
|
||||
# - Apache-2.0
|
||||
# - CC-BY-4.0
|
||||
license: license (GPL-2.0-or-later, MIT, etc)
|
||||
|
||||
min_ansible_version: 2.1
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
#
|
||||
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||
# To view available platforms and versions (or releases), visit:
|
||||
# https://galaxy.ansible.com/api/v1/platforms/
|
||||
#
|
||||
# platforms:
|
||||
# - name: Fedora
|
||||
# versions:
|
||||
# - all
|
||||
# - 25
|
||||
# - name: SomePlatform
|
||||
# versions:
|
||||
# - all
|
||||
# - 1.0
|
||||
# - 7
|
||||
# - 99.99
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
26
roles/mariaDB_install/tasks/main.yml
Normal file
26
roles/mariaDB_install/tasks/main.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
# tasks file for mariaDB_install
|
||||
- name: Install
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- mariadb-server
|
||||
state: present
|
||||
|
||||
|
||||
- name: Check version
|
||||
shell: dpkg -l | grep mariadb-server | awk '{print $3}' | head -n 1 | awk -F ":" '{print $2}' | cut -d '.' -f 1,2
|
||||
register: mariadb_server_ver
|
||||
|
||||
#- name: Print version
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ mariadb_server_ver.stdout }}"
|
||||
|
||||
|
||||
- name: Copy config
|
||||
template:
|
||||
src: ../templates/50-server.cnf
|
||||
dest: /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
notify: mariadb restart
|
||||
118
roles/mariaDB_install/templates/50-server.cnf
Normal file
118
roles/mariaDB_install/templates/50-server.cnf
Normal file
@@ -0,0 +1,118 @@
|
||||
#
|
||||
# These groups are read by MariaDB server.
|
||||
# Use it for options that only the server (but not clients) should see
|
||||
|
||||
# this is read by the standalone daemon and embedded servers
|
||||
[server]
|
||||
|
||||
# this is only for the mysqld standalone daemon
|
||||
[mysqld]
|
||||
|
||||
#
|
||||
# * Basic Settings
|
||||
#
|
||||
|
||||
user = mysql
|
||||
pid-file = /run/mysqld/mysqld.pid
|
||||
basedir = /usr
|
||||
#datadir = /var/lib/mysql
|
||||
datadir = {{ mariadb_location }}
|
||||
tmpdir = /tmp
|
||||
lc-messages-dir = /usr/share/mysql
|
||||
lc-messages = en_US
|
||||
skip-external-locking
|
||||
|
||||
# Broken reverse DNS slows down connections considerably and name resolve is
|
||||
# safe to skip if there are no "host by domain name" access grants
|
||||
#skip-name-resolve
|
||||
|
||||
# Instead of skip-networking the default is now to listen only on
|
||||
# localhost which is more compatible and is not less secure.
|
||||
bind-address = 0.0.0.0
|
||||
|
||||
#
|
||||
# * Fine Tuning
|
||||
#
|
||||
|
||||
#key_buffer_size = 128M
|
||||
#max_allowed_packet = 1G
|
||||
#thread_stack = 192K
|
||||
#thread_cache_size = 8
|
||||
# This replaces the startup script and checks MyISAM tables if needed
|
||||
# the first time they are touched
|
||||
#myisam_recover_options = BACKUP
|
||||
#max_connections = 100
|
||||
#table_cache = 64
|
||||
|
||||
#
|
||||
# * Logging and Replication
|
||||
#
|
||||
|
||||
# Both location gets rotated by the cronjob.
|
||||
# Be aware that this log type is a performance killer.
|
||||
# Recommend only changing this at runtime for short testing periods if needed!
|
||||
#general_log_file = /var/log/mysql/mysql.log
|
||||
#general_log = 1
|
||||
|
||||
# When running under systemd, error logging goes via stdout/stderr to journald
|
||||
# and when running legacy init error logging goes to syslog due to
|
||||
# /etc/mysql/conf.d/mariadb.conf.d/50-mysqld_safe.cnf
|
||||
# Enable this if you want to have error logging into a separate file
|
||||
#log_error = /var/log/mysql/error.log
|
||||
# Enable the slow query log to see queries with especially long duration
|
||||
#slow_query_log_file = /var/log/mysql/mariadb-slow.log
|
||||
#long_query_time = 10
|
||||
#log_slow_verbosity = query_plan,explain
|
||||
#log-queries-not-using-indexes
|
||||
#min_examined_row_limit = 1000
|
||||
|
||||
# The following can be used as easy to replay backup logs or for replication.
|
||||
# note: if you are setting up a replication slave, see README.Debian about
|
||||
# other settings you may need to change.
|
||||
#server-id = 1
|
||||
#log_bin = /var/log/mysql/mysql-bin.log
|
||||
expire_logs_days = 10
|
||||
#max_binlog_size = 100M
|
||||
|
||||
#
|
||||
# * SSL/TLS
|
||||
#
|
||||
|
||||
# For documentation, please read
|
||||
# https://mariadb.com/kb/en/securing-connections-for-client-and-server/
|
||||
#ssl-ca = /etc/mysql/cacert.pem
|
||||
#ssl-cert = /etc/mysql/server-cert.pem
|
||||
#ssl-key = /etc/mysql/server-key.pem
|
||||
#require-secure-transport = on
|
||||
|
||||
#
|
||||
# * Character sets
|
||||
#
|
||||
|
||||
# MySQL/MariaDB default is Latin1, but in Debian we rather default to the full
|
||||
# utf8 4-byte character set. See also client.cnf
|
||||
character-set-server = utf8mb4
|
||||
collation-server = utf8mb4_general_ci
|
||||
|
||||
#
|
||||
# * InnoDB
|
||||
#
|
||||
|
||||
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
|
||||
# Read the manual for more InnoDB related options. There are many!
|
||||
# Most important is to give InnoDB 80 % of the system RAM for buffer use:
|
||||
# https://mariadb.com/kb/en/innodb-system-variables/#innodb_buffer_pool_size
|
||||
#innodb_buffer_pool_size = 8G
|
||||
|
||||
# this is only for embedded server
|
||||
[embedded]
|
||||
|
||||
# This group is only read by MariaDB servers, not by MySQL.
|
||||
# If you use the same .cnf file for MySQL and MariaDB,
|
||||
# you can put MariaDB-only options here
|
||||
[mariadb]
|
||||
|
||||
# This group is only read by MariaDB-{{ mariadb_server_ver.stdout }} servers.
|
||||
# If you use the same .cnf file for MariaDB of different versions,
|
||||
# use this group for options that older servers don't understand
|
||||
[mariadb-{{ mariadb_server_ver.stdout }}]
|
||||
2
roles/mariaDB_install/tests/inventory
Normal file
2
roles/mariaDB_install/tests/inventory
Normal file
@@ -0,0 +1,2 @@
|
||||
localhost
|
||||
|
||||
5
roles/mariaDB_install/tests/test.yml
Normal file
5
roles/mariaDB_install/tests/test.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- mariaDB_install
|
||||
2
roles/mariaDB_install/vars/main.yml
Normal file
2
roles/mariaDB_install/vars/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# vars file for mariaDB_install
|
||||
Reference in New Issue
Block a user