Skip to content

Commit df585a6

Browse files
committed
deploy.yml: use command module for managing service.
With service module deploy failed with error: sudo: a password is required Correction for 7a84086 commit. Addressed to #399
1 parent 7a84086 commit df585a6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/scripts/ci/ansible/deploy.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
state: paused
3434
when: uptimerobot is defined and uptimerobot.monitorid != '' and uptimerobot.apikey != ''
3535

36+
# we can't use service module here because our sudoers allows to execute only exact commands
3637
- name: Stopping service
37-
service:
38-
name: mystamps
39-
state: stopped
38+
command:
39+
systemctl stop mystamps
4040
become: yes
4141
become_user: root
4242
become_method: sudo
@@ -50,10 +50,10 @@
5050
mode: '0755'
5151
backup: yes
5252

53+
# we can't use service module here because our sudoers allows to execute only exact commands
5354
- name: Starting service
54-
service:
55-
name: mystamps
56-
state: started
55+
command:
56+
systemctl start mystamps
5757
become: yes
5858
become_user: root
5959
become_method: sudo

0 commit comments

Comments
 (0)