Skip to content

Commit

Permalink
Switch from lineinfile to native service module
Browse files Browse the repository at this point in the history
  • Loading branch information
medanthelinium committed Dec 5, 2023
1 parent 392d9d7 commit d630700
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
9 changes: 3 additions & 6 deletions tasks/solr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@
notify: Restart Solr

- name: Enable Solr service
ansible.builtin.lineinfile:
path: "{{ item }}"
regexp: "^solr_enable="
line: 'solr_enable="YES"'
with_items:
- /etc/rc.conf
ansible.builtin.service:
name: solr
enabled: yes
notify: Start Solr
11 changes: 2 additions & 9 deletions tasks/tika.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,15 @@
- Start Tika
- Restart Tika

- name: Stop the native rc.d Tika service
- name: Stop and disable the native rc.d Tika service
ansible.builtin.service:
name: tika
state: stopped
enabled: no
notify:
- Start Tika
- Restart Tika

- name: Disable the native rc.d Tika service
ansible.builtin.lineinfile:
path: "{{ item }}"
regexp: "^tika_enable="
line: 'tika_enable="NO"'
with_items:
- /etc/rc.conf

- name: Install Tika service
ansible.builtin.template:
src: supervisord.d/tika.conf
Expand Down

0 comments on commit d630700

Please sign in to comment.