source: main/waeup-ansible/playbook-prep-reboot.yml @ 15294

Last change on this file since 15294 was 14906, checked in by uli, 7 years ago

Care for new host during reboot.

File size: 2.4 KB
Line 
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#
14
15- hosts: h5.waeup.org
16  become: yes
17  become_user: root
18  tasks:
19  #- name: do something
20  #  file: state=touch path=/home/uli/123
21  #  become_user: kofa
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
32
33
34- hosts: h6.waeup.org
35  become: yes
36  become_user: root
37  tasks:
38  - name: Stop Ikoba AAUE instance
39    command: sudo -u ikoba /ikoba/aaue/bin/ikobactl stop
40    args:
41      chdir: /ikoba/aaue/
42  - name: Stop Ikoba PCN instance
43    command: sudo -u ikoba /ikoba/pcn/bin/ikobactl stop
44    args:
45      chdir: /ikoba/pcn/
46  - name: Stop Ikoba Demo instance
47    command: sudo -u ikoba /ikoba/demo/bin/ikobactl stop
48    args:
49      chdir: /ikoba/demo/
50  - name: Stop Kofa instances
51    command: sudo -u kofa /kofa/scripts/kofactl_all.sh stop
52    args:
53      chdir: /kofa/scripts
54
55
56- hosts: h7.waeup.org
57  become: yes
58  become_user: root
59  tasks:
60  - name: Stop Kofa instances
61    command: sudo -u kofa /kofa/scripts/kofactl_all.sh stop
62    args:
63      chdir: /kofa/scripts
64  - name: Stop Ikoba Uniben instance
65    command: sudo -u ikoba /ikoba/ikobacustom.uniben/bin/ikobactl stop
66    args:
67      chdir: /ikoba/ikobacustom.uniben/
68  - name: Stop vagrant vhost1
69    become_user: vhosts
70    command: vagrant halt
71    args:
72      chdir: /home/vhosts/vhost1/
73
74- hosts: h8.waeup.org
75  become: yes
76  become_user: root
77  tasks:
78  - name: Stop vagrant vhost2
79    become_user: vhosts
80    command: vagrant halt
81    args:
82      chdir: /home/vhosts/vhost2/
83  - name: Stop vagrant vhost3
84    become_user: vhosts
85    command: vagrant halt
86    args:
87      chdir: /home/vhosts/vhost3/
88  - name: Stop vagrant vhost4
89    become_user: vhosts
90    command: vagrant halt
91    args:
92      chdir: /home/vhosts/vhost4/
93  - name: Stop vagrant vhost5
94    become_user: vhosts
95    command: vagrant halt
96    args:
97      chdir: /home/vhosts/vhost5/
Note: See TracBrowser for help on using the repository browser.