forked from Netz39_Admin/netz39-infra-ansible
Merge branch 'phpmyadmin'
This commit is contained in:
commit
527770ab28
5 changed files with 47 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
||||||
Setup
|
Setup
|
||||||
```bash
|
```bash
|
||||||
ansible-galaxy install -r requirements.yml
|
ansible-galaxy install -r requirements.yml
|
||||||
|
ansible-galaxy collection install community.general
|
||||||
```
|
```
|
||||||
|
|
||||||
Call with
|
Call with
|
||||||
|
|
17
main.yml
17
main.yml
|
@ -3,6 +3,8 @@
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
|
|
||||||
server_admin: "admin@netz39.de"
|
server_admin: "admin@netz39.de"
|
||||||
admin_users: [tux, alex]
|
admin_users: [tux, alex]
|
||||||
|
|
||||||
|
@ -11,6 +13,14 @@
|
||||||
docker_compose_version: "1.25.4"
|
docker_compose_version: "1.25.4"
|
||||||
docker_compose_path: /usr/local/bin/docker-compose
|
docker_compose_path: /usr/local/bin/docker-compose
|
||||||
|
|
||||||
|
mysql_root_pw: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
64313138383833643866383332623265383863623332343864306537633931326139303638303761
|
||||||
|
6464653933613663643632383935376164393033363233330a313063613832396166666464666136
|
||||||
|
36633532393231663634663034666666356332373438646130643161383134653739663066626538
|
||||||
|
3661663132343639310a613431653031626434323064313465373866666332353931313836623465
|
||||||
|
3461
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: ansible.timezone
|
- role: ansible.timezone
|
||||||
|
|
||||||
|
@ -39,8 +49,11 @@
|
||||||
- name: Setup users
|
- name: Setup users
|
||||||
include_tasks: tasks/users.yml
|
include_tasks: tasks/users.yml
|
||||||
|
|
||||||
- name: Setup Docker
|
- name: Install Docker
|
||||||
include_tasks: tasks/docker.yml
|
include_tasks: tasks/docker_install.yml
|
||||||
|
|
||||||
|
- name: Setup Docker Containers
|
||||||
|
include_tasks: tasks/docker_setup.yml
|
||||||
|
|
||||||
- name: Setup httpd
|
- name: Setup httpd
|
||||||
include_tasks: tasks/httpd.yml
|
include_tasks: tasks/httpd.yml
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
vars:
|
vars:
|
||||||
packages:
|
packages:
|
||||||
- docker-ce
|
- docker-ce
|
||||||
|
- python-docker
|
||||||
|
|
||||||
- name: Set docker configuration
|
- name: Set docker configuration
|
||||||
copy:
|
copy:
|
24
tasks/docker_setup.yml
Normal file
24
tasks/docker_setup.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
- name: Setup docker network
|
||||||
|
docker_network:
|
||||||
|
name: dockernet
|
||||||
|
driver: bridge
|
||||||
|
ipam_config:
|
||||||
|
- subnet: 192.168.0.0/24
|
||||||
|
gateway: 192.168.0.1
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Setup phpmyadmin
|
||||||
|
docker_container:
|
||||||
|
name: phpmyadmin
|
||||||
|
state: started
|
||||||
|
image: phpmyadmin:5.0
|
||||||
|
networks_cli_compatible: true
|
||||||
|
networks:
|
||||||
|
- name: dockernet
|
||||||
|
restart_policy: always
|
||||||
|
env:
|
||||||
|
PMA_HOST: 192.168.0.1
|
||||||
|
MYSQL_ROOT_PASSWORD: "{{ mysql_root_pw }}"
|
||||||
|
PMA_ABSOLUTE_URI: "https://mysql.adm.netz39.de"
|
||||||
|
published_ports:
|
||||||
|
- 9001:80
|
|
@ -10,6 +10,12 @@
|
||||||
name: rewrite
|
name: rewrite
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- name: Setup proxy site mysql.adm.netz39.de
|
||||||
|
include_role:
|
||||||
|
name: setup-http-site-proxy
|
||||||
|
vars:
|
||||||
|
site_name: mysql.adm.netz39.de
|
||||||
|
proxy_port: 9001
|
||||||
|
|
||||||
- name: Setup proxy site testredmine.netz39.de
|
- name: Setup proxy site testredmine.netz39.de
|
||||||
include_role:
|
include_role:
|
||||||
|
|
Loading…
Reference in a new issue