Okay, fixed.
And as Randy mentioned, we can use this without fixing @2579.
diff --git a/roles/bodhi2/backend/files/bodhi-automated-pushes.py b/roles/bodhi2/backend/files/bodhi-auto
new file mode 100644
index 0000000..aacc81c
--- /dev/null
+++ b/roles/bodhi2/backend/files/bodhi-automated-pushes.py
@@ -0,0 +1,12 @@
+import requests
+import json
+import subprocess
+import logging
+
+req = requests.get('https://bodhi.fedoraproject.org/composes/')
+bodhi_composes = req.json()
+
+if len(bodhi_composes['composes']) == 0:
+ bodhi_push_cmd = ["bodhi-push", "--username", "releng"]
+ push = subprocess.Popen(bodhi_push_cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE)
+ push.stdin.write('y')
diff --git a/roles/bodhi2/backend/tasks/main.yml b/roles/bodhi2/backend/tasks/main.yml
index f76d944..7e37d24 100644
--- a/roles/bodhi2/backend/tasks/main.yml
+++ b/roles/bodhi2/backend/tasks/main.yml
@@ -264,6 +264,14 @@
- bodhi
- cron
+- name: put bodhi-automated-pushes.py in place
+ copy: src=bodhi-automated-pushes.py dest=/usr/local/bin/bodhi-automated-pushes.py mode=0755
+ when: inventory_hostname.startswith('bodhi-backend01') and env == "production"
+ tags:
+ - config
+ - bodhi
+ - cron
+
- name: put update-fullfiletimelist in place
copy: src="{{ files }}/scripts/update-fullfiletimelist" dest=/usr/local/bin/update-fullfiletimelist mo
when: inventory_hostname.startswith('bodhi-backend01') and env == "production"
@@ -288,6 +296,14 @@
- bodhi
- cron
+- name: Set the bodhi-automated-pushes cron job
+ template: src=bodhi-automated-pushes.cron.j2 dest=/etc/cron.d/bodhi-automated-pushes
+ when: inventory_hostname.startswith('bodhi-backend01') and env == "production"
+ tags:
+ - config
+ - bodhi
+ - cron
+
- name: directory sizes update cron job.
cron: name="directory-sizes-update" minute="30" hour="19" user="ftpsync"
job="/usr/bin/find /pub/alt/ /pub/archive/ /pub/fedora-secondary/ /pub/fedora/ /pub/epel/ -type
diff --git a/roles/bodhi2/backend/templates/bodhi-automated-pushes.cron.j2 b/roles/bodhi2/backend/templat
new file mode 100644
index 0000000..7d440af
--- /dev/null
+++ b/roles/bodhi2/backend/templates/bodhi-automated-pushes.cron.j2
@@ -0,0 +1,5 @@
+{% if Frozen %}
+{{ '#' }}00 00 * * * apache /usr/local/bin/bodhi-automated-pushes.py
+{% else %}
+00 00 * * * apache /usr/local/bin/bodhi-automated-pushes.py
+{% endif %}