diff options
| author | Carlos Konstanski <ckonstanski@pippiandcarlos.com> | 2018-03-06 20:57:21 -0700 |
|---|---|---|
| committer | Carlos Konstanski <ckonstanski@pippiandcarlos.com> | 2018-03-06 21:06:45 -0700 |
| commit | ba2c32f0841c681c671ac33b60e261cbd4da30dc (patch) | |
| tree | 5d8b0e52531ca7538cbd4f22a32becb87bd92879 /salt/openbook/ansible | |
| parent | 65d48553f1144300bad9ec8543d08339e0f8a1a2 (diff) | |
Support pure systemd hosts
Issue: IS-75
Diffstat (limited to 'salt/openbook/ansible')
| -rw-r--r-- | salt/openbook/ansible/files/openbook.yaml | 5 | ||||
| -rw-r--r-- | salt/openbook/ansible/files/stop_start_openbook.yaml | 14 |
2 files changed, 8 insertions, 11 deletions
diff --git a/salt/openbook/ansible/files/openbook.yaml b/salt/openbook/ansible/files/openbook.yaml index df51b22..bb9c6ed 100644 --- a/salt/openbook/ansible/files/openbook.yaml +++ b/salt/openbook/ansible/files/openbook.yaml @@ -158,10 +158,7 @@ when: ansible_distribution == "Gentoo" and ansible_service_mgr == "systemd" - name: "Add service script to systemd" - shell: "systemctl enable {% raw %}{{ item }}{% endraw %}.service" - with_items: - - openbook - - openbook-debug + shell: systemctl enable openbook.service when: ansible_distribution == "Ubuntu" or ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or (ansible_distribution == "Gentoo" and ansible_service_mgr == "systemd") - name: "Enable openbook service" diff --git a/salt/openbook/ansible/files/stop_start_openbook.yaml b/salt/openbook/ansible/files/stop_start_openbook.yaml index abe4be4..28c5d58 100644 --- a/salt/openbook/ansible/files/stop_start_openbook.yaml +++ b/salt/openbook/ansible/files/stop_start_openbook.yaml @@ -16,9 +16,9 @@ name: "{{ item.name }}" state: stopped runlevel: "{{ item.runlevel }}" - with_items: - - { name: openbook, runlevel: default } - - { name: openbook-debug, runlevel: default } + with_items: + - { name: openbook, runlevel: default } + - { name: openbook-debug, runlevel: default } ignore_errors: True when: action == "stop" @@ -40,8 +40,8 @@ name: "{{ item.name }}" state: started runlevel: "{{ item.runlevel }}" - with_items: - - { name: openbook, runlevel: default } + with_items: + - { name: openbook, runlevel: default } when: action in ["start", "restart"] and extra_args != "debug" - name: "Start Openbook in debug mode" @@ -49,6 +49,6 @@ name: "{{ item.name }}" state: started runlevel: "{{ item.runlevel }}" - with_items: - - { name: openbook-debug, runlevel: default } + with_items: + - { name: openbook-debug, runlevel: default } when: action in ["start", "restart"] and extra_args == "debug" |
