testing
This commit is contained in:
parent
30900bb721
commit
6c28acc121
@ -1,3 +1,6 @@
|
||||
[defaults]
|
||||
inventory = ./environments/development
|
||||
interpreter_python = /usr/bin/python3
|
||||
|
||||
[connection]
|
||||
pipelining = true
|
||||
|
@ -13,3 +13,9 @@
|
||||
loop:
|
||||
- aptitude
|
||||
- python3-docker
|
||||
|
||||
- name: Create Ansible's temporary remote directory
|
||||
file:
|
||||
path: "~/.ansible/tmp"
|
||||
state: directory
|
||||
mode: 0700
|
||||
|
@ -1,3 +1,4 @@
|
||||
docker_root: /var/lib/docker-compose
|
||||
docker_compose: /usr/bin/docker-compose
|
||||
docker_compose_service: compose
|
||||
docker_network: "172.17.0.1/16"
|
||||
|
@ -4,6 +4,18 @@
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Install Docker daemon configuration
|
||||
template:
|
||||
src: daemon.json.j2
|
||||
dest: /etc/docker/daemon.json
|
||||
register: dockerd_config
|
||||
|
||||
- name: Restart Docker
|
||||
service:
|
||||
name: docker
|
||||
state: restarted
|
||||
when: dockerd_config.changed
|
||||
|
||||
- name: Create docker-compose root
|
||||
file:
|
||||
path: "{{ docker_root }}"
|
||||
|
3
roles/docker/templates/daemon.json.j2
Normal file
3
roles/docker/templates/daemon.json.j2
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"bip": "{{ docker_network }}"
|
||||
}
|
@ -6,12 +6,16 @@
|
||||
- name: Create gitea database
|
||||
postgresql_db:
|
||||
name: "{{ gitea_dbname }}"
|
||||
become: true
|
||||
become_user: postgres
|
||||
|
||||
- name: Create gitea database user
|
||||
postgresql_user:
|
||||
db: "{{ gitea_dbname }}"
|
||||
name: "{{ gitea_dbuser }}"
|
||||
password: "{{ gitea_dbpass }}"
|
||||
become: true
|
||||
become_user: postgres
|
||||
|
||||
- name: Install Gitea's docker-compose file
|
||||
template:
|
||||
|
@ -27,4 +27,4 @@ services:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
|
||||
volumes:
|
||||
gitea:
|
||||
{{ gitea_volume }}:
|
||||
|
Loading…
Reference in New Issue
Block a user