Giter Club home page Giter Club logo

ansible-role-complex_password's Introduction

complex_password - Creates a random and complex password with rules

Synopsis

  • Ansible module to randomly generate a complex and strong password that match sets of rules.

Parameters

Parameter Choices/Defaults Comments
length
integer
Default:
12
The number of characters in the generated password.
The length must be between 1 and 128 characters.
min_upper_case
integer
Default:
2
The minimum number of uppercase letters of European languages (A through Z) in the newly generated password.
To exclude upper case characters from the password, specify -1.
min_lower_case
integer
Default:
2
The minimum number of lowercase letters of European languages (a through z) in the newly generated password.
To exclude lower case characters from the password, specify -1.
min_digit
integer
Default:
2
The minimum number of characters from base 10 digits (0 through 9) in the newly generated password.
To exclude digits from the password, specify -1.
min_special
integer
Default:
2
The minimum number of non-alphanumeric characters (special characters) in the newly generated password.
To exclude special characters from the password, specify -1.
special_characters
string
Default:
/*!\"$%()=?{[]}+#-.,<'_:;>~|@
A string containing all special characters allowed to use.
forbidden_characters
string
The characters that cannot be used when generating a new password, e.g /~\.
prevent_repeating_characters
boolean
Choices:
  • no
  • yes ←
Whether or not characters can be used more than once in a password.

Examples

- hosts: localhost

  roles:
    - role: complex_password

  tasks:

    - name: generate a complex password
      complex_password:
        length: 14
        min_upper_case: 3
        min_lower_case: 2
        min_digit: 1
        min_special: 4
        special_characters: '+-'
        prevent_repeating_characters: no

    - name: debug message
      debug:
        var: complex_password

    - name: generate a complex password
      complex_password:
        length: 14
        min_upper_case: 5
        min_lower_case: -1
        min_digit: 3
        min_special: 1
        forbidden_chars: aA0
      register: my_complex_password

    - name: debug message
      debug:
        var: my_complex_password.ansible_facts.complex_password

Return Values

Facts returned by this module are added/updated in the hostvars host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.

Fact Returned Description
complex_password
string
success A string containing the password in plain text.

Authors

  • Stéphane Bilqué (@sbilque)

License

This project is licensed under the Apache 2.0 License.

See LICENSE to see the full text.

ansible-role-complex_password's People

Contributors

sbilque avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.