2014-10-03 13:14:38 +00:00
|
|
|
# Push out any new badge stuff.
|
|
|
|
#
|
|
|
|
# Badge artists and badge developers should be pushing stuff to this repo:
|
|
|
|
#
|
|
|
|
# https://git.fedorahosted.org/cgit/badges.git
|
|
|
|
#
|
|
|
|
# This playbook will take any new content from there and push it out onto our
|
|
|
|
# servers.
|
|
|
|
|
2015-09-25 18:49:17 +00:00
|
|
|
- name: get the badges repo happening from the batcave
|
|
|
|
hosts: batcave01.phx2.fedoraproject.org
|
2014-10-03 13:14:38 +00:00
|
|
|
user: root
|
|
|
|
gather_facts: False
|
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- /srv/web/infra/ansible/vars/global.yml
|
2015-01-09 22:59:18 +00:00
|
|
|
- "/srv/private/ansible/vars.yml"
|
2014-10-03 13:14:38 +00:00
|
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
|
|
|
|
vars:
|
|
|
|
tempdir: /var/tmp/badges-tempdir
|
2017-03-23 16:05:49 +00:00
|
|
|
upstream: "https://pagure.io/fedora-badges-assets.git"
|
2016-01-15 16:17:42 +00:00
|
|
|
workingdir: /srv/web/infra/badges/
|
2014-10-03 13:14:38 +00:00
|
|
|
|
|
|
|
tasks:
|
|
|
|
- name: clone the local bare repo
|
|
|
|
git: dest={{tempdir}} repo=/git/badges remote=origin update=yes
|
|
|
|
|
|
|
|
- name: add fedorahosted as a second remote
|
|
|
|
command: git remote add fhosted {{upstream}} chdir={{tempdir}}
|
|
|
|
|
|
|
|
- name: pull down changes from fedorahosted
|
|
|
|
command: git pull fhosted master chdir={{tempdir}}
|
|
|
|
|
|
|
|
- name: push fedorahosted changes back to the lockbox bare repo
|
|
|
|
command: git push origin master chdir={{tempdir}}
|
|
|
|
|
|
|
|
- name: clean up that temporary {{tempdir}} dir
|
|
|
|
file: dest={{tempdir}} state=absent
|
|
|
|
|
2016-01-15 16:17:42 +00:00
|
|
|
- name: and pull those commits from the bare repo to the working dir
|
|
|
|
command: git pull origin master chdir={{workingdir}}
|
|
|
|
|
2015-01-06 16:30:46 +00:00
|
|
|
handlers:
|
|
|
|
- include: "{{ handlers }}/restart_services.yml"
|
|
|
|
|
2014-10-03 13:14:38 +00:00
|
|
|
- name: copy new badge art over to the badges web nodes
|
2016-11-04 18:27:42 +00:00
|
|
|
hosts: badges-web:badges-web-stg
|
2014-10-03 13:14:38 +00:00
|
|
|
user: root
|
|
|
|
gather_facts: False
|
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- /srv/web/infra/ansible/vars/global.yml
|
2015-01-09 22:59:18 +00:00
|
|
|
- "/srv/private/ansible/vars.yml"
|
2014-10-03 13:14:38 +00:00
|
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
|
|
|
|
roles:
|
|
|
|
- badges/frontend
|
|
|
|
|
2015-01-06 16:30:46 +00:00
|
|
|
handlers:
|
|
|
|
- include: "{{ handlers }}/restart_services.yml"
|
|
|
|
|
2014-10-03 13:14:38 +00:00
|
|
|
- name: copy any new badges rules over to the badges backend and restart it
|
2016-11-04 18:27:42 +00:00
|
|
|
hosts: badges-backend:badges-backend-stg
|
2014-10-03 13:14:38 +00:00
|
|
|
user: root
|
|
|
|
gather_facts: False
|
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- /srv/web/infra/ansible/vars/global.yml
|
2015-01-09 22:59:18 +00:00
|
|
|
- "/srv/private/ansible/vars.yml"
|
2014-10-03 13:14:38 +00:00
|
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
|
|
|
|
roles:
|
|
|
|
- badges/backend
|
2015-01-06 16:30:46 +00:00
|
|
|
|
|
|
|
handlers:
|
|
|
|
- include: "{{ handlers }}/restart_services.yml"
|