calvinbui.ansible_htpasswd

Build Status GitHub release Ansible Quality Score Ansible Role

Ansible htpasswd

Add and remove username/password entries in a password file using htpasswd.

Requirements

N/A

Role Variables

htpasswd_users: A list users to add. All available options used in the htpasswd module can be used here as well. Set it exactly the same as the htpasswd module, e.g.

htpasswd_users:
  - name: janedoe
    password: '9s36?;fyNp'
    owner: root
    group: www-data
    mode: 0640
    path: /etc/nginx/passwdfile
  - name: foobar
    state: absent
    path: /etc/nginx/passwdfile
  - name: alex
    password: oedu2eGh
    crypt_scheme: md5_crypt
    path: /etc/nginx/passwdfile
  - ...

Dependencies

passlib

Example Playbook

- hosts: servers
  become: true
  pre_tasks:
    - name: Update apt cache.
      apt:
        update_cache: true
        cache_valid_time: 600
      changed_when: false
  roles:
   - role: ansible-htpasswd

License

GPLv3

Author Information

http://calvin.me

About

Add and remove username/password entries in a password file using htpasswd

Install
ansible-galaxy install calvinbui.ansible_htpasswd
GitHub repository
License
Unknown
Downloads
253
Owner
Soft tabs > spaces > tabs. I'm not a developer.