1
votes

I have a system user on all of my systems that gets a default password; we're using a vendor for this, and we aren't able to remove the password from the initial setup.

We're currently setting the shell to nologin; is there any way with the User module to remove the password?

I could use the shell module to replace the password with !! in the shadow file, but I feel like Ansible probably has a better solution, and I just haven't found it yet.

1

1 Answers

3
votes

The last time I looked into this, there was no "good" solution. I do something like this when I need to:

- name: Lock root password
  user: name=root password='!'