template out rsyncd config

This commit is contained in:
Louis Abel 2022-07-16 20:10:20 -07:00
parent ca1b67c286
commit 1848569d33
Signed by: label
GPG Key ID: 6735C0E1BD65D048
2 changed files with 71 additions and 58 deletions

View File

@ -1,69 +1,19 @@
uid = nobody
gid = mirror
use chroot = yes
max connections = 40
max connections = {{ rsync_max_connections }}
pid file = /var/run/rsyncd.pid
exclude = lost+found/
exclude = {{ rsync_exclude }}
transfer logging = yes
timeout = 600
timeout = {{ rsync_timeout }}
ignore nonreadable = yes
dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2 *.iso
dont compress = {{ rsync_no_compress }}
reverse lookup = no
forward lookup = no
motd file = /etc/rsyncd-motd
[rocky-staging]
path = /mnt/repos-staging/mirror/pub/rocky
comment = Rocky Linux Staging Repositories
read only = true
refuse options = checksum
list = false
{% for path in paths %}
[{{ path.name }}]
{{ path.content|indent(width=8) }}
[rocky-production]
path = /mnt/repos-production
comment = Rocky Linux Production
read only = true
refuse options = checksum
list = true
[rocky-linux]
path = /mnt/repos-production/mirror/pub/rocky
comment = Rocky Linux Production
read only = true
refuse options = false
list = false
[rocky-sigs]
path = /mnt/repos-production/mirror/pub/sigs
comment = Rocky Linux Special Interest Groups
read only = true
refuse options = checksum
list = false
[rocky]
path = /mnt/repos-production
comment = Rocky Linux - !!Deprecated Module!! - Please use rocky-linux
read only = true
refuse options = checksum
list = true
[rocky-everything]
path = /mnt/repos-production/mirror/
comment = All content available on the mirror. Rocky (Prod+Vault), CentOS (Vault)
read only = true
refuse options = checksum
list = true
[rocky-vault]
path = /mnt/repos-production/mirror/vault/rocky
comment = Rocky Linux Vault - Archived Releases
read only = true
refuse options = checksum
list = true
[centos-vault]
path = /mnt/repos-production/mirror/vault/centos
comment = CentOS 8 Vault
read only = true
refuse options = checksum
list = true
{% endfor %}

63
vars/rsync.yml Normal file
View File

@ -0,0 +1,63 @@
---
rsync_max_connections: '30'
rsync_no_compress: '*.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2 *.iso'
rsync_timeout: '600'
rsync_exclude: 'lost+found/ .snapshot/ .~tmp~/ /.private/ /.private/** **/.nfs*'
rsync_paths:
- name: rocky-staging
content: |
path = /mnt/repos-staging/mirror/pub/rocky
comment = Rocky Linux Staging Repositories
read only = true
refuse options = checksum
list = false
- name: rocky-production
content: |
path = /mnt/repos-production
comment = Rocky Linux Production
read only = true
refuse options = checksum
list = true
- name: rocky-linux
content: |
path = /mnt/repos-production/mirror/pub/rocky
comment = Rocky Linux Production
read only = true
refuse options = false
list = false
- name: rocky-sigs
content: |
path = /mnt/repos-production/mirror/pub/sigs
comment = Rocky Linux Special Interest Groups
read only = true
refuse options = checksum
list = false
- name: rocky
content: |
path = /mnt/repos-production
comment = Rocky Linux - !!Deprecated Module!! - Please use rocky-linux
read only = true
refuse options = checksum
list = true
- name: rocky-everything
content: |
path = /mnt/repos-production/mirror/
comment = All content available on the mirror. Rocky (Prod+Vault), CentOS (Vault)
read only = true
refuse options = checksum
list = true
- name: rocky-vault
content: |
path = /mnt/repos-production/mirror/vault/rocky
comment = Rocky Linux Vault - Archived Releases
read only = true
refuse options = checksum
list = true
- name: centos-vault
content: |
path = /mnt/repos-production/mirror/vault/centos
comment = CentOS 8 Vault
read only = true
refuse options = checksum
list = true
...