This commit is contained in:
Kris Lamoureux 2022-05-26 01:33:20 -04:00
parent 30900bb721
commit 6c28acc121
7 changed files with 30 additions and 1 deletions

View File

@ -1,3 +1,6 @@
[defaults] [defaults]
inventory = ./environments/development inventory = ./environments/development
interpreter_python = /usr/bin/python3 interpreter_python = /usr/bin/python3
[connection]
pipelining = true

View File

@ -13,3 +13,9 @@
loop: loop:
- aptitude - aptitude
- python3-docker - python3-docker
- name: Create Ansible's temporary remote directory
file:
path: "~/.ansible/tmp"
state: directory
mode: 0700

View File

@ -1,3 +1,4 @@
docker_root: /var/lib/docker-compose docker_root: /var/lib/docker-compose
docker_compose: /usr/bin/docker-compose docker_compose: /usr/bin/docker-compose
docker_compose_service: compose docker_compose_service: compose
docker_network: "172.17.0.1/16"

View File

@ -4,6 +4,18 @@
state: present state: present
update_cache: true 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 - name: Create docker-compose root
file: file:
path: "{{ docker_root }}" path: "{{ docker_root }}"

View File

@ -0,0 +1,3 @@
{
"bip": "{{ docker_network }}"
}

View File

@ -6,12 +6,16 @@
- name: Create gitea database - name: Create gitea database
postgresql_db: postgresql_db:
name: "{{ gitea_dbname }}" name: "{{ gitea_dbname }}"
become: true
become_user: postgres
- name: Create gitea database user - name: Create gitea database user
postgresql_user: postgresql_user:
db: "{{ gitea_dbname }}" db: "{{ gitea_dbname }}"
name: "{{ gitea_dbuser }}" name: "{{ gitea_dbuser }}"
password: "{{ gitea_dbpass }}" password: "{{ gitea_dbpass }}"
become: true
become_user: postgres
- name: Install Gitea's docker-compose file - name: Install Gitea's docker-compose file
template: template:

View File

@ -27,4 +27,4 @@ services:
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
volumes: volumes:
gitea: {{ gitea_volume }}: