daniel_lynch / daniel_lynch.passbolt / 0.1.10 / module / get_or_create_password Get or create password in Passbolt Authors: Alban Garrigue (@albang)daniel_lynch.passbolt.get_or_create_password (0.1.10) — module
Install with ansible-galaxy collection install daniel_lynch.passbolt:==0.1.10
collections: - name: daniel_lynch.passbolt version: 0.1.10
The Passbolt get_or_create password module try to get a password in Passbolt via the API, if it doesn't exist the module create it.
You either need the gpgkey and the passphrase or the fingerprint of the secret key stored in the gpg-agent.
- name: Get or create Password daniel_lynch.passbolt.get_or_create_password: passbolt_uri: "https://passbolt.example.com" gpgkey: "{{ gpgkey }}" passphrase: "password" name: "Testing" password: "{{ lookup('ansible.builtin.password', '/dev/null', chars=['ascii_letters', 'digits', 'punctuation']) }}" username: "Test" uri: "test.com" description: "This is a description" delegate_to: localhost register: get_or_create_password
# You can use it where you want - debug: msg: "The password is {{ get_or_create_password.password.password }}"
uri: description: - The uri field of the password you wish to create. (Optional) required: false type: str name: description: - The name of the password you wish to create. required: true type: str gpgkey: description: - The GPG Private key used to access Passbolt. required: false type: str verify: description: - Whether to verify SSL or not. (Defaults to verify) required: false password: description: - The password you wish to create. required: true type: str username: description: - The username field of the password you wish to create. (Optional but strongly encouraged.) required: false type: str passphrase: description: - The Passphrase used with the GPG Private key used to access Passbolt. required: false type: str description: description: - The description field of the password you wish to create. (Optional) required: false type: str fingerprint: description: - The fingerprint of the imported Private key used to access Passbolt. required: false passbolt_uri: description: - The Passbolt instance Fully Qualified Domain Name(FQDN) required: true type: str encrypt_description: default: true description: - Option to create the password description as a secret and encrypt it in the database. (Optional. Defaults to true.) required: false type: bool