Skip to content

Commit

Permalink
switch to root user when setting NODE_TLS_REJECT_UNAUTHORIZED in pm2 …
Browse files Browse the repository at this point in the history
…init file

Signed-off-by: Kipchirchir Sigei <[email protected]>
  • Loading branch information
KipSigei authored and DavisRayM committed Oct 5, 2021
1 parent 6d616d2 commit e0c2a05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasks/install-enketo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,13 @@
- "reload pm2-{{ enketo_user }}"

- name: Disable rejection of self signed certs
become: true
become_user: "root"
lineinfile:
path: "/etc/systemd/system/pm2-{{ enketo_user }}.service"
line: "export NODE_TLS_REJECT_UNAUTHORIZED=0"
state: present
when: enketo_node_tls_reject is defined
when: enketo_set_node_tls_reject_env is defined and enketo_set_node_tls_reject_env

- block:
- name: Replace pm2 resurrect with pm2 start
Expand Down

0 comments on commit e0c2a05

Please sign in to comment.