Skip to content

Instantly share code, notes, and snippets.

@mfilipe
Created December 26, 2016 17:16
Show Gist options
  • Save mfilipe/eaa43481a6e2ef7dd64feb35ac3ee0f7 to your computer and use it in GitHub Desktop.
Save mfilipe/eaa43481a6e2ef7dd64feb35ac3ee0f7 to your computer and use it in GitHub Desktop.
- name: start service
service: name={{service_name}} state=started
when: service_status.stat.exists
register: start_result
tags:
- start
- name: update systemd files
shell: systemctl daemon-reload
when: start_result.failed and 'systemctl daemon-reload' in start_result.msg
tags:
- start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment