Changeset 14186 for main/waeup-ansible


Ignore:
Timestamp:
24 Sep 2016, 09:45:55 (8 years ago)
Author:
uli
Message:

Hm, this is much shorter.

Just learned how to include other playbooks in playbooks. It is really
that simple.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup-ansible/playbook-reboot.yml

    r14185 r14186  
    1515#
    1616
    17 # ##########################################################
    18 # PREPARE REBOOT
    19 # ##########################################################
    20 - hosts: h5.waeup.org
    21   become: yes
    22   become_user: root
    23   tasks:
    24   #- name: do something
    25   #  file: state=touch path=/home/uli/123
    26   #  become_user: kofa
    27   - name: Stop odoo
    28     service: name=odoo-server state=stopped
    29   - name: Stop scientific african
    30     command: sudo -u henrik /home/henrik/zope/instances/sciafr/bin/zopectl stop
    31   - name: Stop uniben-staff
    32     command: sudo -u henrik /data/srp/instances/uniben-staff/bin/zopectl stop
    33   - name: Stop ngren plone
    34     command: sudo -u plone /data/plone/ngren/bin/instance stop
    35   - name: Stop waeup plone
    36     command: sudo -u plone /data/plone/waeup/bin/instance stop
     17- include: playbook-prep-reboot.yml
    3718
    38 
    39 - hosts: h6.waeup.org
    40   become: yes
    41   become_user: root
    42   tasks:
    43   - name: Stop Ikoba PCN instance
    44     command: sudo -u ikoba /ikoba/pcn/bin/ikobactl stop
    45     args:
    46       chdir: /ikoba/pcn/
    47   - name: Stop Kofa instances
    48     command: sudo -u kofa /kofa/scripts/kofactl_all.sh stop
    49     args:
    50       chdir: /kofa/scripts
    51 
    52 
    53 - hosts: h7.waeup.org
    54   become: yes
    55   become_user: root
    56   tasks:
    57   - name: Stop kofa instances
    58     command: sudo -u kofa /kofa/scripts/kofactl_all.sh stop
    59     args:
    60       chdir: /kofa/scripts
    61 
    62 
    63 # ##########################################################
    64 # REBOOT
    65 # ##########################################################
    6619- hosts: all
    6720  become: yes
     
    8336                  connect_timeout=5
    8437
    85 
    86 # ##########################################################
    87 # RESTART SERVICES
    88 # ##########################################################
    89 - hosts: h5.waeup.org
    90   become: true
    91   become_user: root
    92   tasks:
    93   - name: Start odoo
    94     service: name=odoo-server state=started
    95   - name: Start scientific african
    96     command: sudo -u henrik /home/henrik/zope/instances/sciafr/bin/zopectl start
    97   - name: Start uniben-staff
    98     command: sudo -u henrik /data/srp/instances/uniben-staff/bin/zopectl start
    99   - name: Start ngren plone
    100     command: sudo -u plone /data/plone/ngren/bin/instance start
    101   - name: Start waeup plone
    102     command: sudo -u plone /data/plone/waeup/bin/instance start
    103 
    104 - hosts: h6.waeup.org
    105   become: yes
    106   become_user: root
    107   tasks:
    108   - name: Start Ikoba PCN instance
    109     command: sudo -u ikoba /ikoba/pcn/bin/ikobactl start
    110     args:
    111       chdir: /ikoba/pcn/
    112   - name: Start Kofa instances
    113     command: sudo -u kofa /kofa/scripts/kofactl_all.sh start
    114     args:
    115       chdir: /kofa/scripts
    116 
    117 
    118 - hosts: h7.waeup.org
    119   become: yes
    120   become_user: root
    121   tasks:
    122   - name: Start kofa instances
    123     command: sudo -u kofa /kofa/scripts/kofactl_all.sh start
    124     args:
    125       chdir: /kofa/scripts
     38- include: playbook-post-reboot.yml
Note: See TracChangeset for help on using the changeset viewer.