Apply fixes after testing

This commit is contained in:
Sam A. 2023-12-25 21:49:17 +01:00
parent 2d9eb03b66
commit 3ac0ded2a3
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
13 changed files with 40 additions and 24 deletions

View file

@ -32,7 +32,7 @@ apps_vars:
monerod: monerod:
backup: false backup: false
sender: false sender: false
extra_tasks: false extra_tasks: true
domain: xmr.{{ apps_local_domain }} domain: xmr.{{ apps_local_domain }}
version: latest version: latest

View file

@ -0,0 +1,9 @@
# vim: ft=yaml.ansible
# code: language=ansible
---
- name: Create subfolder for monerod data
ansible.builtin.file:
path: "{{ apps_data_root }}/monerod/data/bitmonero"
owner: '1000'
mode: u=rwx,g=rx,o=rx
state: directory

View file

@ -8,7 +8,7 @@
mode: u=rwx,g=rx,o=rx mode: u=rwx,g=rx,o=rx
state: directory state: directory
- name: Copy nginx config for {{ app }} - name: Copy nginx configs
ansible.builtin.template: ansible.builtin.template:
src: nginx/conf.d/{{ app }}.conf.j2 src: nginx/conf.d/{{ app }}.conf.j2
dest: "{{ apps_data_root }}/nginx/data/conf.d/{{ app }}.conf" dest: "{{ apps_data_root }}/nginx/data/conf.d/{{ app }}.conf"

View file

@ -7,7 +7,7 @@
enable_ipv6: true enable_ipv6: true
ipam_config: ipam_config:
- subnet: 172.17.2.0/24 - subnet: 172.17.2.0/24
gateway: 172.17.2.1 - subnet: fd02::/64
state: present state: present
- name: Create Docker network for Postfix - name: Create Docker network for Postfix

View file

@ -16,8 +16,8 @@ services:
aliases: aliases:
- ipfs - ipfs
ports: ports:
- {{ ansible_hostname }}:4001:4001/tcp - 4001:4001/tcp
- {{ ansible_hostname }}:4001:4001/udp - 4001:4001/udp
volumes: volumes:
- "./data/ipfs-config.sh:/container-init.d/ipfs-config.sh:ro" - "./data/ipfs-config.sh:/container-init.d/ipfs-config.sh:ro"
- "./data/data:/data/ipfs:rw" - "./data/data:/data/ipfs:rw"

View file

@ -12,9 +12,9 @@ services:
aliases: aliases:
- monerod - monerod
ports: ports:
- {{ ansible_hostname }}:18080:18080/tcp - 18080:18080/tcp
volumes: volumes:
- "./data:/home/monero/.bitmonero:rw" - "./data/bitmonero:/home/monero/.bitmonero:rw"
networks: networks:
{{ apps_shared_docker_network }}: {{ apps_shared_docker_network }}:

View file

@ -4,10 +4,10 @@
server { server {
listen 8080; listen 8080;
server_name {{ apps_vars.ipfs.domain }}; server_name {{ apps_vars.ipfs.domain }};
resolver 127.0.0.11;
location / { location / {
proxy_pass http://ipfs:5001; set $upstream http://ipfs:5001;
proxy_pass $upstream;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto "https"; proxy_set_header X-Forwarded-Proto "https";
} }
@ -16,10 +16,10 @@ server {
server { server {
listen 8080; listen 8080;
server_name ~^([\w-]+\.(ipfs|ipns)\.)?{{ apps_vars.ipfs.gateway_domain }}$; server_name ~^([\w-]+\.(ipfs|ipns)\.)?{{ apps_vars.ipfs.gateway_domain }}$;
resolver 127.0.0.11;
location / { location / {
proxy_pass http://ipfs:8080; set $upstream http://ipfs:8080;
proxy_pass $upstream;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto "https"; proxy_set_header X-Forwarded-Proto "https";
} }

View file

@ -4,10 +4,10 @@
server { server {
listen 8080; listen 8080;
server_name {{ apps_vars.monerod.domain }}; server_name {{ apps_vars.monerod.domain }};
resolver 127.0.0.11;
location / { location / {
proxy_pass http://monerod:18089; set $upstream http://monerod:18089;
proxy_pass $upstream;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto "https"; proxy_set_header X-Forwarded-Proto "https";
} }

View file

@ -4,10 +4,10 @@
server { server {
listen 8080; listen 8080;
server_name {{ apps_vars.nextcloud.domain }}; server_name {{ apps_vars.nextcloud.domain }};
resolver 127.0.0.11;
location / { location / {
proxy_pass http://nextcloud:80; set $upstream http://nextcloud:80;
proxy_pass $upstream;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto "https"; proxy_set_header X-Forwarded-Proto "https";
} }

View file

@ -1,4 +1,10 @@
{ {
"default-address-pools": [
{
"base": "172.17.0.0/16",
"size": 24
}
],
"experimental": true, "experimental": true,
"ip6tables": true "ip6tables": true
} }

View file

@ -1,14 +1,6 @@
# vim: ft=yaml.ansible # vim: ft=yaml.ansible
# code: language=ansible # code: language=ansible
--- ---
- name: Copy Docker daemon config file
ansible.builtin.copy:
src: daemon.json
dest: /etc/docker/daemon.json
owner: root
mode: u=rw,g=r,o=r
notify: Reload Docker daemon
- name: Add Docker PGP key - name: Add Docker PGP key
ansible.builtin.rpm_key: ansible.builtin.rpm_key:
key: https://download.docker.com/linux/centos/gpg key: https://download.docker.com/linux/centos/gpg
@ -35,6 +27,14 @@
- containerd.io - containerd.io
state: present state: present
- name: Copy Docker daemon config file
ansible.builtin.copy:
src: daemon.json
dest: /etc/docker/daemon.json
owner: root
mode: u=rw,g=r,o=r
notify: Reload Docker daemon
- name: Ensure Docker daemon is enabled and running - name: Ensure Docker daemon is enabled and running
ansible.builtin.service: ansible.builtin.service:
name: docker name: docker

View file

@ -18,4 +18,6 @@ PrintMotd no
UseDNS no UseDNS no
AcceptEnv LANG LC_* AcceptEnv LANG LC_*
Subsystem sftp internal-sftp
Include /etc/ssh/sshd_config.d/*.conf Include /etc/ssh/sshd_config.d/*.conf

View file

@ -10,7 +10,6 @@
source: 192.168.0.0/16 source: 192.168.0.0/16
permanent: true permanent: true
state: enabled state: enabled
loop:
- name: Move internal network to zone 'internal' - name: Move internal network to zone 'internal'
ansible.posix.firewalld: ansible.posix.firewalld: