17 lines
442 B
YAML
17 lines
442 B
YAML
- name: Start or Stop NWL Jenkins Instance
|
|
hosts: "{{ target }}"
|
|
gather_facts: false
|
|
vars:
|
|
root_path: "~/nwl-ci"
|
|
tasks:
|
|
- name: Start/Stop the NWL Jenkins instance with docker-compose
|
|
ansible.builtin.shell: |
|
|
if [[ "{{power_status}}" == "start" ]]; then
|
|
docker-compose up -d
|
|
else
|
|
docker-compose down
|
|
fi
|
|
args:
|
|
chdir: "{{root_path}}"
|
|
executable: /bin/bash
|