# salt.states.webutil

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

Added in version 2014.7.0.

    username:
      webutil.user_exists:
        - password: secr3t
        - htpasswd_file: /etc/nginx/htpasswd
        - options: d
        - force: true

salt.states.webutil.user_absent(name, htpasswd_file=None, runas=None)

  Make sure the user is not in the specified htpasswd file

  name

    User name

  htpasswd_file

    Path to the htpasswd file

  runas

    The system user to run htpasswd command with

salt.states.webutil.user_exists(name, password=None, htpasswd_file=None, options='', force=False, runas=None, update=False)

  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

  update

    Update an existing user's password if it's different from what's in the htpasswd file (unlike force, which updates regardless)