22.27.40. salt.states.htpasswd

Support for htpasswd module

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, **kwargs)

Make sure the user is inside the /etc/nginx/htpasswd

name
username
password
password of the user
htpasswd_file
path to the file that htpasswd will handle
options
see salt.module.htpasswd.useradd
force
touch the file even if user already created

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.7.1

Previous topic

22.27.39. salt.states.host

Next topic

22.27.41. salt.states.incron

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.