diff --git a/inventory/host_vars/download01.phx2.fedoraproject.org b/inventory/host_vars/download01.phx2.fedoraproject.org index 470bc545ee..6f19b41f5d 100644 --- a/inventory/host_vars/download01.phx2.fedoraproject.org +++ b/inventory/host_vars/download01.phx2.fedoraproject.org @@ -32,3 +32,5 @@ lvm_size: 20000 num_cpus: 8 vpn: false + +external_hostname: dl01.fedoraproject.org diff --git a/inventory/host_vars/download02.phx2.fedoraproject.org b/inventory/host_vars/download02.phx2.fedoraproject.org index a82c89030f..1f25f9bdf7 100644 --- a/inventory/host_vars/download02.phx2.fedoraproject.org +++ b/inventory/host_vars/download02.phx2.fedoraproject.org @@ -32,3 +32,5 @@ lvm_size: 20000 num_cpus: 8 vpn: false + +external_hostname: dl02.fedoraproject.org diff --git a/inventory/host_vars/download03.phx2.fedoraproject.org b/inventory/host_vars/download03.phx2.fedoraproject.org index f8a694b0b4..c6cd212f5d 100644 --- a/inventory/host_vars/download03.phx2.fedoraproject.org +++ b/inventory/host_vars/download03.phx2.fedoraproject.org @@ -2,3 +2,5 @@ gw: 10.5.126.254 eth0_ip: 10.5.126.95 eth1_ip: 10.5.127.103 + +external_hostname: dl03.fedoraproject.org diff --git a/inventory/host_vars/download04.phx2.fedoraproject.org b/inventory/host_vars/download04.phx2.fedoraproject.org index 6bec9b4c0b..2156aefed4 100644 --- a/inventory/host_vars/download04.phx2.fedoraproject.org +++ b/inventory/host_vars/download04.phx2.fedoraproject.org @@ -2,3 +2,5 @@ gw: 10.5.126.254 eth0_ip: 10.5.126.96 eth1_ip: 10.5.127.104 + +external_hostname: dl04.fedoraproject.org diff --git a/inventory/host_vars/download05.phx2.fedoraproject.org b/inventory/host_vars/download05.phx2.fedoraproject.org index e018bc6c1d..46339778fd 100644 --- a/inventory/host_vars/download05.phx2.fedoraproject.org +++ b/inventory/host_vars/download05.phx2.fedoraproject.org @@ -4,3 +4,5 @@ eth0_ip: 10.5.126.97 eth1_ip: 10.5.127.105 # This is a tier1 only host rsyncd_conf: "rsyncd.conf.download-{{ datacenter }}-tier1" + +external_hostname: dl05.fedoraproject.org diff --git a/inventory/host_vars/download06.phx2.fedoraproject.org b/inventory/host_vars/download06.phx2.fedoraproject.org index d4b176ad9c..0eddcfd731 100644 --- a/inventory/host_vars/download06.phx2.fedoraproject.org +++ b/inventory/host_vars/download06.phx2.fedoraproject.org @@ -32,3 +32,5 @@ lvm_size: 20000 num_cpus: 8 vpn: false + +external_hostname: dl06.fedoraproject.org diff --git a/roles/download/tasks/main.yml b/roles/download/tasks/main.yml index 125163a175..07264650ab 100644 --- a/roles/download/tasks/main.yml +++ b/roles/download/tasks/main.yml @@ -39,10 +39,7 @@ - selinux - name: /etc/motd_fedora - copy: src=motd_fedora dest=/etc/motd_fedora - -- name: /etc/motd_fedora_tier1 - copy: src=motd_fedora_tier1 dest=/etc/motd_fedora_tier1 + template: src=rsync/motd_fedora.j2 dest =/etc/motd_fedora - name: Configure logrotate for /var/log/rsyncd-fedora.log copy: src=logrotate-rsync-fedora dest=/etc/logrotate.d/rsync-fedora diff --git a/roles/download/templates/rsync/motd_fedora.j2 b/roles/download/templates/rsync/motd_fedora.j2 new file mode 100644 index 0000000000..bd189cd8dd --- /dev/null +++ b/roles/download/templates/rsync/motd_fedora.j2 @@ -0,0 +1,15 @@ +---------------------------- +Fedora Master Mirror Servers +---------------------------- +{% if inventory_hostname in groups['download_tier1'] %} +NOTE: This server is for authorized Fedora tier1 mirrors only! +{% endif %} + +If you are using bare rsync to sync content, please stop and +take a look at https://pagure.io/quick-fedora-mirror. + +See http://fedoraproject.org/wiki/Infrastructure/Mirroring for +further instructions. +---------------------------- + +You have connected to {{ external_hostname }} diff --git a/roles/download/templates/rsync/motd_fedora_tier1.j2 b/roles/download/templates/rsync/motd_fedora_tier1.j2 new file mode 100644 index 0000000000..2e737ce366 --- /dev/null +++ b/roles/download/templates/rsync/motd_fedora_tier1.j2 @@ -0,0 +1,11 @@ +---------------------------- +Fedora Master Mirror Servers +---------------------------- +NOTE: This server is for authorized Fedora tier1 mirrors only! + +If you are using bare rsync to sync content, please stop and +take a look at https://pagure.io/quick-fedora-mirror. + +See http://fedoraproject.org/wiki/Infrastructure/Mirroring for +further instructions. +----------------------------