docker.yml aktualisiert
This commit is contained in:
parent
704ce58f5c
commit
ea8541135e
42
docker.yml
42
docker.yml
@ -127,6 +127,45 @@
|
|||||||
"ip6tables": true
|
"ip6tables": true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- name: /home/docker/_defaults/mariadb/genrootpw
|
||||||
|
blockinfile:
|
||||||
|
path: /home/docker/_defaults/mariadb/genrootpw
|
||||||
|
create: yes
|
||||||
|
mode: 0550
|
||||||
|
owner: root
|
||||||
|
group: docker
|
||||||
|
marker: "# {mark} ANSIBLE MANAGED BLOCK"
|
||||||
|
block: |
|
||||||
|
cd /home/docker/_defaults/mariadb
|
||||||
|
|
||||||
|
mysqlpassword=$(pwgen -s 32 1)
|
||||||
|
|
||||||
|
[ -f env.db ] || echo "MARIADB_ROOT_PASSWORD=!MYSQLPASSWORD!
|
||||||
|
" >envroot.db
|
||||||
|
|
||||||
|
[ -f env.phpmyadmin ] || echo "PMA_USER=root
|
||||||
|
PMA_PASSWORD=!MYSQLPASSWORD!
|
||||||
|
" >env.rootphpmyadmin
|
||||||
|
|
||||||
|
chmod 440 envroot.db env.rootphpmyadmin
|
||||||
|
chown root:docker envroot.db env.rootphpmyadmin
|
||||||
|
sed -i "s/\!MYSQLPASSWORD\!/$mysqlpassword/g" envroot.db env.rootphpmyadmin
|
||||||
|
|
||||||
|
backup: yes
|
||||||
|
validate: /bin/bash -n %s
|
||||||
|
|
||||||
|
- name: /home/docker/_defaults/mariadb/genrootpw shebang
|
||||||
|
lineinfile:
|
||||||
|
path: /home/docker/_defaults/mariadb/genrootpw
|
||||||
|
insertbefore: BOF
|
||||||
|
line: "#!/bin/bash -e"
|
||||||
|
|
||||||
|
- name: Gen initial passwords if not exists
|
||||||
|
ansible.builtin.shell: ./genpw.sh
|
||||||
|
args:
|
||||||
|
chdir: /home/docker/_defaults/mariadb/genrootpw
|
||||||
|
creates: /home/docker/_defaults/mariadb/envroot.db
|
||||||
|
|
||||||
- name: mariadb env defaults
|
- name: mariadb env defaults
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /home/docker/_defaults/mariadb/mariadb.env
|
path: /home/docker/_defaults/mariadb/mariadb.env
|
||||||
@ -135,7 +174,6 @@
|
|||||||
group: root
|
group: root
|
||||||
create: yes
|
create: yes
|
||||||
block: |
|
block: |
|
||||||
MARIADB_RANDOM_ROOT_PASSWORD=1
|
|
||||||
MARIADB_AUTO_UPGRADE=1
|
MARIADB_AUTO_UPGRADE=1
|
||||||
MARIADB_INITDB_SKIP_TZINFO=1
|
MARIADB_INITDB_SKIP_TZINFO=1
|
||||||
# from here: save memory https://techroads.org/reducing-memory-use-on-my-mariadb-mysql-wordpress-docker-stack/
|
# from here: save memory https://techroads.org/reducing-memory-use-on-my-mariadb-mysql-wordpress-docker-stack/
|
||||||
@ -172,6 +210,7 @@
|
|||||||
#innodb_buffer_pool_size=10K
|
#innodb_buffer_pool_size=10K
|
||||||
#innodb_log_buffer_size=512K
|
#innodb_log_buffer_size=512K
|
||||||
backup: yes
|
backup: yes
|
||||||
|
|
||||||
- name: /usr/local/sbin/autoupdate.d/docker.update
|
- name: /usr/local/sbin/autoupdate.d/docker.update
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /usr/local/sbin/autoupdate.d/docker.update
|
path: /usr/local/sbin/autoupdate.d/docker.update
|
||||||
@ -277,6 +316,7 @@
|
|||||||
done
|
done
|
||||||
backup: yes
|
backup: yes
|
||||||
validate: /bin/bash -n %s
|
validate: /bin/bash -n %s
|
||||||
|
|
||||||
- name: docker-compose command/alias for backward compatibility - now docker compose
|
- name: docker-compose command/alias for backward compatibility - now docker compose
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /usr/local/sbin/docker-compose
|
path: /usr/local/sbin/docker-compose
|
||||||
|
Loading…
Reference in New Issue
Block a user