salt.states.htpasswd

Support for htpasswd module. Requires the apache2-utils package for Debian-based distros.

New in version 2014.7.0.

username:
  webutil.user_exists:
    - password: secr3t
    - htpasswd_file: /etc/nginx/htpasswd
    - options: d
    - force: true
salt.states.htpasswd.user_exists(name, password=None, htpasswd_file=None, options='', force=False, runas=None)

Make sure the user is inside the specified htpasswd file

name
User name
password
User password
htpasswd_file
Path to the htpasswd file
options
See salt.modules.htpasswd.useradd
force
Touch the file even if user already created
runas
The system user to run htpasswd command with

Docs for previous releases are available on readthedocs.org.

Latest Salt release: 2016.3.2

Previous topic

salt.states.host

Next topic

salt.states.http