From 10b2cd5fed4e07ce8997dbf218969abc4179d3ca Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 28 Oct 2020 09:15:20 +1100 Subject: [PATCH] reprepo: enable cron jobs Enable the Ansible based cron jobs, and disable the puppet host versions to cut over the mirroring to the new server. Change-Id: I0ffb1c484e64e67f5a5017dc3c3c8ebcdc3845c8 --- .../openstack_project/manifests/mirror_update.pp | 13 +++++++++++++ playbooks/roles/reprepro/tasks/utils/cron.yaml | 4 +--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/openstack_project/manifests/mirror_update.pp b/modules/openstack_project/manifests/mirror_update.pp index 3dfea8cfdd..ff9dad521c 100644 --- a/modules/openstack_project/manifests/mirror_update.pp +++ b/modules/openstack_project/manifests/mirror_update.pp @@ -1,5 +1,9 @@ # == Class: openstack_project::mirror_update # +# NOTE(ianw) : 2020-10-28 all cron jobs disabled +# as mirroring has moved to the mirror-update.opendev.org server +# managed by ansible. +# class openstack_project::mirror_update ( $reprepro_keytab = '', $admin_keytab = '', @@ -66,6 +70,7 @@ class openstack_project::mirror_update ( } cron { 'reprepro debian': + ensure => absent, user => 'root', hour => '*/2', minute => fqdn_rand(45, 'reprepro-debian'), @@ -120,6 +125,7 @@ class openstack_project::mirror_update ( } cron { 'reprepro debian security': + ensure => absent, user => 'root', hour => '*/2', minute => fqdn_rand(45, 'reprepro-debian-security'), @@ -158,6 +164,7 @@ class openstack_project::mirror_update ( } cron { 'reprepro ubuntu': + ensure => absent, user => 'root', hour => '*/2', minute => fqdn_rand(45, 'reprepro-ubuntu'), @@ -180,6 +187,7 @@ class openstack_project::mirror_update ( } cron { 'reprepro ubuntu-ports': + ensure => absent, user => 'root', hour => '*/2', minute => fqdn_rand(45, 'reprepro-ubuntu-ports'), @@ -218,6 +226,7 @@ class openstack_project::mirror_update ( } cron { 'reprepro debian ceph nautilus': + ensure => absent, user => 'root', hour => '*/2', minute => fqdn_rand(45, 'debian-ceph-nautilus'), @@ -240,6 +249,7 @@ class openstack_project::mirror_update ( } cron { 'reprepro debian ceph octopus': + ensure => absent, user => 'root', hour => '*/2', minute => fqdn_rand(45, 'debian-ceph-octopus'), @@ -292,6 +302,7 @@ class openstack_project::mirror_update ( } cron { 'reprepro debian docker': + ensure => absent, user => 'root', hour => '*/2', minute => fqdn_rand(45, 'debian-docker'), @@ -328,6 +339,7 @@ class openstack_project::mirror_update ( } cron { 'reprepro ubuntu puppetlabs': + ensure => absent, user => 'root', hour => '*/2', minute => fqdn_rand(45, 'ubuntu-puppetlabs'), @@ -389,6 +401,7 @@ class openstack_project::mirror_update ( } cron { 'reprepro ubuntu-cloud-archive': + ensure => absent, user => 'root', hour => '*/2', minute => fqdn_rand(45, 'ubuntu-cloud-archive-mirror'), diff --git a/playbooks/roles/reprepro/tasks/utils/cron.yaml b/playbooks/roles/reprepro/tasks/utils/cron.yaml index 384b71dae6..2a33be6c1e 100644 --- a/playbooks/roles/reprepro/tasks/utils/cron.yaml +++ b/playbooks/roles/reprepro/tasks/utils/cron.yaml @@ -1,9 +1,7 @@ - name: Install update cron jobs cron: name: '{{ _string_name }} reprepro mirror sync' - # NOTE(ianw) 2020-10-19 : initially disabled so we can try - # manually before we enable everything. - state: absent + state: present job: 'flock -n /var/run/reprepro/{{ _dir }}.lock reprepro-mirror-update {{ _dir }} {{ _volume }} >> /var/log/reprepro/{{ _dir }}.log 2>&1' hour: '*/2' minute: '{{ 45 | random(seed=inventory_hostname) }}'