summaryrefslogtreecommitdiffstats
path: root/playbooks/manual/upgrade/fedmsg.yml
blob: 2e7f7b463f6a61c2b615e3980839051f333ee9b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
- name: push packages out
  hosts:
  - fedmsg-hubs
  - fedmsg-hubs-stg

  - fedmsg-relays
  - fedmsg-relays-stg

  - fedmsg-ircs
  - fedmsg-ircs-stg

  - fedmsg-gateways
  - fedmsg-gateways-stg

  - moksha-hubs
  - moksha-hubs-stg

  - notifs-web
  - notifs-web-stg

  - datagrepper
  - datagrepper-stg

  user: root
  vars_files: 
   - /srv/web/infra/ansible/vars/global.yml
   - "/srv/private/ansible/vars.yml"
   - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
  vars:
    testing: False
    packages:
    - fedmsg
    - python2-fedmsg-meta-fedora-infrastructure
    - python-moksha-hub
  handlers:
  - import_tasks: "{{ handlers_path }}/restart_services.yml"

  tasks:
  - name: clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
    command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
    check_mode: no
  - name: yum update fedmsg packages from the main repo
    package: name={{item}} state=latest
    when: not testing
    with_items: "{{packages}}"
  - name: yum update fedmsg packages from testing repo
    package: name={{item}} state=latest enablerepo=infrastructure-tags-stg
    when: testing
    with_items: "{{packages}}"

  # Restart all the backend daemons
  #- import_tasks: "{{tasks_path}}../restart-fedmsg-services.yml"

# Also restart the frontend web services
- name: bounce apache
  hosts: notifs_web:notifs_web_stg:datagrepper:datagrepper_stg
  user: root
  vars_files: 
   - /srv/web/infra/ansible/vars/global.yml
   - "/srv/private/ansible/vars.yml"
   - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
  handlers:
  - import_tasks: "{{ handlers_path }}/restart_services.yml"

  tasks:
  - service: name="httpd" state=restarted