Reload systemctl and restart ara on service unit file

We were not reloading or restarting ara after changing
the parameters.
This means that running a second time with different
parameters will not be effective automatically.

Also, in order to be effective, the unit file we setup
needs to be in /etc/systemd, not /usr/lib/systemd.

Change-Id: I53716fc2bdb7cf8afc2c5ea39ab953a51c9c4585
This commit is contained in:
David Moreau Simard 2018-04-24 21:12:21 -04:00
parent 871f825406
commit 7b2d04f850
No known key found for this signature in database
GPG Key ID: 33A07694CBB71ECC
2 changed files with 19 additions and 4 deletions

View File

@ -13,8 +13,18 @@
# License for the specific language governing permissions and limitations
# under the License.
- name: reload systemctl daemon
systemd:
daemon_reload: yes
- name: restart apache
service:
name: "{{ apache_service }}"
state: "restarted"
state: restarted
become: true
- name: restart ara
service:
name: ara
state: restarted
become: true

View File

@ -23,15 +23,20 @@
- name: Copy systemd service template
template:
src: templates/ara-service.conf.j2
dest: /usr/lib/systemd/system/ara.service
dest: /etc/systemd/system/ara.service
owner: root
group: root
mode: 0644
notify:
- reload systemctl daemon
- restart ara
- name: Start and enable the embedded server service
- name: Flush handlers
meta: flush_handlers
- name: Ensure the embedded server service is started and enabled
systemd:
name: ara
state: started
enabled: yes
daemon_reload: yes
become: true