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
|
||||
```bash
|
||||
ansible-galaxy install -r requirements.yml
|
||||
ansible-galaxy collection install community.general
|
||||
```
|
||||
|
||||
Call with
|
||||
|
|
17
main.yml
17
main.yml
|
@ -3,6 +3,8 @@
|
|||
become: true
|
||||
|
||||
vars:
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
|
||||
server_admin: "admin@netz39.de"
|
||||
admin_users: [tux, alex]
|
||||
|
||||
|
@ -11,6 +13,14 @@
|
|||
docker_compose_version: "1.25.4"
|
||||
docker_compose_path: /usr/local/bin/docker-compose
|
||||
|
||||
mysql_root_pw: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
64313138383833643866383332623265383863623332343864306537633931326139303638303761
|
||||
6464653933613663643632383935376164393033363233330a313063613832396166666464666136
|
||||
36633532393231663634663034666666356332373438646130643161383134653739663066626538
|
||||
3661663132343639310a613431653031626434323064313465373866666332353931313836623465
|
||||
3461
|
||||
|
||||
roles:
|
||||
- role: ansible.timezone
|
||||
|
||||
|
@ -39,8 +49,11 @@
|
|||
- name: Setup users
|
||||
include_tasks: tasks/users.yml
|
||||
|
||||
- name: Setup Docker
|
||||
include_tasks: tasks/docker.yml
|
||||
- name: Install Docker
|
||||
include_tasks: tasks/docker_install.yml
|
||||
|
||||
- name: Setup Docker Containers
|
||||
include_tasks: tasks/docker_setup.yml
|
||||
|
||||
- name: Setup httpd
|
||||
include_tasks: tasks/httpd.yml
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
vars:
|
||||
packages:
|
||||
- docker-ce
|
||||
- python-docker
|
||||
|
||||
- name: Set docker configuration
|
||||
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
|
||||
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
|
||||
include_role:
|
||||
|
|
Loading…
Reference in a new issue