[13957] | 1 | --- |
---|
| 2 | # This ansible-playbook prepares productive |
---|
| 3 | # servers for reboot. |
---|
| 4 | # |
---|
| 5 | # What it does: |
---|
| 6 | # stop all services in need of manual stop |
---|
| 7 | # |
---|
| 8 | # It will normally be run with ``ask-pass`` |
---|
| 9 | # |
---|
| 10 | # Sample: |
---|
| 11 | # |
---|
| 12 | # $ ansible-playbook -i host -K -l h5.waeup.org playbook-prep-reboot.yml |
---|
| 13 | # |
---|
[14031] | 14 | |
---|
[13957] | 15 | - hosts: h5.waeup.org |
---|
| 16 | become: yes |
---|
| 17 | become_user: root |
---|
| 18 | tasks: |
---|
[14031] | 19 | #- name: do something |
---|
| 20 | # file: state=touch path=/home/uli/123 |
---|
| 21 | # become_user: kofa |
---|
[15902] | 22 | #- name: Stop odoo |
---|
| 23 | # service: name=odoo-server state=stopped |
---|
| 24 | #- name: Stop scientific african |
---|
| 25 | # command: sudo -u henrik /home/henrik/zope/instances/sciafr/bin/zopectl stop |
---|
| 26 | #- name: Stop uniben-staff |
---|
| 27 | # command: sudo -u henrik /data/srp/instances/uniben-staff/bin/zopectl stop |
---|
| 28 | #- name: Stop ngren plone |
---|
| 29 | # command: sudo -u plone /data/plone/ngren/bin/instance stop |
---|
| 30 | #- name: Stop waeup plone |
---|
| 31 | # command: sudo -u plone /data/plone/waeup/bin/instance stop |
---|
[13957] | 32 | |
---|
| 33 | |
---|
[14031] | 34 | - hosts: h6.waeup.org |
---|
| 35 | become: yes |
---|
| 36 | become_user: root |
---|
| 37 | tasks: |
---|
[14330] | 38 | - name: Stop Ikoba AAUE instance |
---|
| 39 | command: sudo -u ikoba /ikoba/aaue/bin/ikobactl stop |
---|
| 40 | args: |
---|
| 41 | chdir: /ikoba/aaue/ |
---|
[14031] | 42 | - name: Stop Ikoba PCN instance |
---|
| 43 | command: sudo -u ikoba /ikoba/pcn/bin/ikobactl stop |
---|
| 44 | args: |
---|
| 45 | chdir: /ikoba/pcn/ |
---|
[14192] | 46 | - name: Stop Ikoba Demo instance |
---|
| 47 | command: sudo -u ikoba /ikoba/demo/bin/ikobactl stop |
---|
| 48 | args: |
---|
| 49 | chdir: /ikoba/demo/ |
---|
[14031] | 50 | - name: Stop Kofa instances |
---|
| 51 | command: sudo -u kofa /kofa/scripts/kofactl_all.sh stop |
---|
| 52 | args: |
---|
| 53 | chdir: /kofa/scripts |
---|
[13957] | 54 | |
---|
[14031] | 55 | |
---|
| 56 | - hosts: h7.waeup.org |
---|
| 57 | become: yes |
---|
| 58 | become_user: root |
---|
| 59 | tasks: |
---|
[14192] | 60 | - name: Stop Kofa instances |
---|
[14031] | 61 | command: sudo -u kofa /kofa/scripts/kofactl_all.sh stop |
---|
| 62 | args: |
---|
| 63 | chdir: /kofa/scripts |
---|
[14192] | 64 | - name: Stop Ikoba Uniben instance |
---|
| 65 | command: sudo -u ikoba /ikoba/ikobacustom.uniben/bin/ikobactl stop |
---|
| 66 | args: |
---|
| 67 | chdir: /ikoba/ikobacustom.uniben/ |
---|
[15356] | 68 | |
---|
| 69 | |
---|
| 70 | - hosts: h8.waeup.org |
---|
| 71 | become: yes |
---|
| 72 | become_user: root |
---|
| 73 | tasks: |
---|
[14692] | 74 | - name: Stop vagrant vhost1 |
---|
| 75 | become_user: vhosts |
---|
| 76 | command: vagrant halt |
---|
| 77 | args: |
---|
| 78 | chdir: /home/vhosts/vhost1/ |
---|
| 79 | - name: Stop vagrant vhost2 |
---|
| 80 | become_user: vhosts |
---|
| 81 | command: vagrant halt |
---|
| 82 | args: |
---|
| 83 | chdir: /home/vhosts/vhost2/ |
---|
[14772] | 84 | - name: Stop vagrant vhost3 |
---|
| 85 | become_user: vhosts |
---|
| 86 | command: vagrant halt |
---|
| 87 | args: |
---|
| 88 | chdir: /home/vhosts/vhost3/ |
---|
| 89 | - name: Stop vagrant vhost4 |
---|
| 90 | become_user: vhosts |
---|
| 91 | command: vagrant halt |
---|
| 92 | args: |
---|
| 93 | chdir: /home/vhosts/vhost4/ |
---|
[14906] | 94 | - name: Stop vagrant vhost5 |
---|
| 95 | become_user: vhosts |
---|
| 96 | command: vagrant halt |
---|
| 97 | args: |
---|
| 98 | chdir: /home/vhosts/vhost5/ |
---|
[15356] | 99 | - name: Stop vagrant vhost6 |
---|
| 100 | become_user: vhosts |
---|
| 101 | command: vagrant halt |
---|
| 102 | args: |
---|
| 103 | chdir: /home/vhosts/vhost6/ |
---|
[15902] | 104 | |
---|
| 105 | |
---|
| 106 | - hosts: h9.waeup.org |
---|
| 107 | become: yes |
---|
| 108 | become_user: root |
---|
| 109 | tasks: |
---|
| 110 | - name: Stop Kofa instances |
---|
| 111 | command: sudo -u kofa /kofa/scripts/kofactl_all.sh stop |
---|
| 112 | args: |
---|
| 113 | chdir: /kofa/scripts |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | - hosts: h10.waeup.org |
---|
| 117 | become: yes |
---|
| 118 | become_user: root |
---|
| 119 | tasks: |
---|
| 120 | - name: Stop Kofa instances |
---|
| 121 | command: sudo -u kofa /kofa/scripts/kofactl_all.sh stop |
---|
| 122 | args: |
---|
| 123 | chdir: /kofa/scripts |
---|
[15907] | 124 | - name: Stop vagrant vhost10 |
---|
| 125 | become_user: vhosts |
---|
| 126 | command: vagrant halt |
---|
| 127 | args: |
---|
| 128 | chdir: /home/vhosts/vhost10/ |
---|