source: main/waeup-ansible/playbook-post-reboot.yml @ 14065

Last change on this file since 14065 was 14032, checked in by uli, 8 years ago

Add ansible playbook for starting services.

Yet we have a privilege-escalation prob: we can run
a "command" starting with sudo -u. But we cannot
use ansible priv-escalation methods (become and friends).

File size: 1.4 KB
Line 
1---
2# This ansible-playbook starts services on
3# productive servers after reboot.
4#
5# What it does:
6#   start all services in need of manual action.
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-post-reboot.yml
13#
14
15- hosts: h5.waeup.org
16  become: true
17  become_user: root
18  tasks:
19  #- name: do something
20  #  file: state=touch path=/home/henrik/123
21  #  become_user: henrik
22  #  become_method: sudo
23  #  become: true
24  - name: Start odoo
25    service: name=odoo-server state=started
26  - name: Start scientific african
27    command: sudo -u henrik /home/henrik/zope/instances/sciafr/bin/zopectl start
28  - name: Start uniben-staff
29    command: sudo -u henrik /data/srp/instances/uniben-staff/bin/zopectl start
30  - name: Start ngren plone
31    command: sudo -u plone /data/plone/ngren/bin/instance start
32  - name: Start waeup plone
33    command: sudo -u plone /data/plone/waeup/bin/instance start
34
35- hosts: h6.waeup.org
36  become: yes
37  become_user: root
38  tasks:
39  - name: Start Ikoba PCN instance
40    command: sudo -u ikoba /ikoba/pcn/bin/ikobactl start
41    args:
42      chdir: /ikoba/pcn/
43  - name: Start Kofa instances
44    command: sudo -u kofa /kofa/scripts/kofactl_all.sh start
45    args:
46      chdir: /kofa/scripts
47
48
49- hosts: h7.waeup.org
50  become: yes
51  become_user: root
52  tasks:
53  - name: Start kofa instances
54    command: sudo -u kofa /kofa/scripts/kofactl_all.sh start
55    args:
56      chdir: /kofa/scripts
Note: See TracBrowser for help on using the repository browser.