mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-05-09 23:05:43 +02:00
Solved 'capplications' typo bug
This commit is contained in:
parent
27bfee2438
commit
8ae99aaf46
@ -10,7 +10,7 @@
|
|||||||
name: docker-compose
|
name: docker-compose
|
||||||
|
|
||||||
# The following env file will just be used from the dedicated mariadb container
|
# The following env file will just be used from the dedicated mariadb container
|
||||||
# and not the {{capplications.mariadb.hostname }}-database
|
# and not the {{applications.mariadb.hostname }}-database
|
||||||
- name: "Create {{database_env}}"
|
- name: "Create {{database_env}}"
|
||||||
template:
|
template:
|
||||||
src: "env/{{database_type}}.env.j2"
|
src: "env/{{database_type}}.env.j2"
|
||||||
|
@ -8,7 +8,7 @@ The following environment variables need to be defined for successful operation:
|
|||||||
|
|
||||||
To completely reset Friendica, including its database and volumes, run:
|
To completely reset Friendica, including its database and volumes, run:
|
||||||
```bash
|
```bash
|
||||||
docker exec -i {{capplications.mariadb.hostname }} mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
docker exec -i {{applications.mariadb.hostname }} mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
||||||
docker compose down
|
docker compose down
|
||||||
rm -rv /mnt/hdd/data/docker/volumes/friendica_data
|
rm -rv /mnt/hdd/data/docker/volumes/friendica_data
|
||||||
docker volume rm friendica_data
|
docker volume rm friendica_data
|
||||||
@ -19,7 +19,7 @@ docker volume rm friendica_data
|
|||||||
## Manual Method:
|
## Manual Method:
|
||||||
1. Connect to the MariaDB instance:
|
1. Connect to the MariaDB instance:
|
||||||
```bash
|
```bash
|
||||||
docker exec -it {{capplications.mariadb.hostname }} mariadb -u root -p
|
docker exec -it {{applications.mariadb.hostname }} mariadb -u root -p
|
||||||
```
|
```
|
||||||
2. Run the following commands:
|
2. Run the following commands:
|
||||||
```sql
|
```sql
|
||||||
@ -31,7 +31,7 @@ docker volume rm friendica_data
|
|||||||
## Automatic Method:
|
## Automatic Method:
|
||||||
```bash
|
```bash
|
||||||
DB_ROOT_PASSWORD="your_root_password"
|
DB_ROOT_PASSWORD="your_root_password"
|
||||||
docker exec -i {{capplications.mariadb.hostname }} mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
docker exec -i {{applications.mariadb.hostname }} mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Enter the Application Container 🔍
|
## Enter the Application Container 🔍
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
## Execute SQL commands
|
## Execute SQL commands
|
||||||
```bash
|
```bash
|
||||||
docker exec -it {{capplications.mariadb.hostname }} mariadb -u root -p
|
docker exec -it {{applications.mariadb.hostname }} mariadb -u root -p
|
||||||
```
|
```
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
- name: install MariaDB
|
- name: install MariaDB
|
||||||
docker_container:
|
docker_container:
|
||||||
name: "{{capplications.mariadb.hostname }}"
|
name: "{{applications.mariadb.hostname }}"
|
||||||
image: "mariadb:{{applications.mariadb.version}}" #could lead to problems with nextcloud
|
image: "mariadb:{{applications.mariadb.version}}" #could lead to problems with nextcloud
|
||||||
detach: yes
|
detach: yes
|
||||||
env:
|
env:
|
||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
- name: Wait until the MariaDB container is healthy
|
- name: Wait until the MariaDB container is healthy
|
||||||
community.docker.docker_container_info:
|
community.docker.docker_container_info:
|
||||||
name: "{{capplications.mariadb.hostname }}"
|
name: "{{applications.mariadb.hostname }}"
|
||||||
register: db_info
|
register: db_info
|
||||||
until: db_info.containers[0].State.Health.Status == "healthy"
|
until: db_info.containers[0].State.Health.Status == "healthy"
|
||||||
retries: 30
|
retries: 30
|
||||||
@ -71,7 +71,7 @@
|
|||||||
|
|
||||||
- name: Grant database privileges
|
- name: Grant database privileges
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: "docker exec {{capplications.mariadb.hostname }} mariadb -u root -p{{ applications.mariadb.credentials.root_password }} -e \"GRANT ALL PRIVILEGES ON {{database_name}}.* TO '{{database_username}}'@'%';\""
|
cmd: "docker exec {{applications.mariadb.hostname }} mariadb -u root -p{{ applications.mariadb.credentials.root_password }} -e \"GRANT ALL PRIVILEGES ON {{database_name}}.* TO '{{database_username}}'@'%';\""
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user