Reputation: 6139
I want to set the password for nagios core using ansible playbook. Manually doing , command to set the password is :
sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
New password:
Re-type new password:
I want to set the same through ansible playbook.
Upvotes: 1
Views: 306
Reputation: 23811
Did you try the htpasswd
module like this:
- name: Set password to nagios
htpasswd:
path: "/usr/local/nagios/etc/htpasswd.users"
name: nagiosadmin
password: "Very-Secure-Password"
crypt_scheme: md5_crypt
Note: passlib
must be install on host that executes module
Upvotes: 4