HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Which password database system work with ansible?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
withsystempassworddatabaseworkwhichansible

Problem

Which password database system work with ansible to manage password of network devices and servers?

Solution

Any system would do. You might need to write a wrapper. For example:

> cat get-passwd-01.yml
- hosts: localhost
  gather_facts: no
  tasks:
    - command: ~/bin/get-passwd user9
      register: password
    - debug:
        msg: "passwd:{{ password.stdout }}"


.

> ansible-playbook get-passwd-01.yml | grep msg
    "msg": "passwd: T4gpJtZ69R5cZD9zQh"

Code Snippets

> cat get-passwd-01.yml
- hosts: localhost
  gather_facts: no
  tasks:
    - command: ~/bin/get-passwd user9
      register: password
    - debug:
        msg: "passwd:{{ password.stdout }}"
> ansible-playbook get-passwd-01.yml | grep msg
    "msg": "passwd: T4gpJtZ69R5cZD9zQh"

Context

StackExchange DevOps Q#4932, answer score: 3

Revisions (0)

No revisions yet.