Hi All
I am trying to user a systemd service with ansible. Basically I am trying to restart jboss with a jboss user. I have allowed this user to stop/start/ using sudo without a password in the sudoers file and it works
sudo /usr/bin/systemctl stop jboss
. When I try with ansible I get Access denied
---
- hosts: isa
tasks:
- name: make sure jboss is running
service: name=jboss state=running
So I tried running the playbook with the become option
---
- hosts: isa
tasks:
- name: make sure jboss is running
service: name=jboss state=running
become: yes
Now I get this message
=> Missing become password
As I mentioned the sudoers file do not require a password for this command so How to I get ansible run this?