Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

A custom Ansible lookup plugin to retrieve secret information from Thycotic Secret Server

License

Notifications You must be signed in to change notification settings

smeeus/ansible-plugin-secretserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: This repository is archived and will no longer be worked on.

Thycotic Secret Server Ansible lookup plugin

Description

A custom Ansible lookup plugin to retrieve secret information from Thycotic Secret Server via the REST API.

It currently supports retrieving the following secret information:

  • id
  • username
  • password
  • notes

More information about Thycotic Secret Server can be found on their website: https://thycotic.com/products/secret-server/

Dependencies

Ansible 2.x

Python libraries:

  • os
  • sys
  • urlparse
  • json
  • requests

Configuration

Configuration can be set as environment variables or in ansible.cfg

Environment variables

SECRETSERVER_HOST=secretserver.example.com
SECRETSERVER_USERNAME=ansible
SECRETSERVER_PASSWORD=password

Ansible configuration file

...

[secretserver]
host = secretserver.example.com
username = ansible
password = password

Usage

The syntax for looking up specific secret information is

lookup('secretserver', '<secret_name>')
lookup('secretserver', '<secret_name>.<type>')

Example usage playbook:

- hosts: local
  vars:
    searchitems:
      - my_first_secret_name
      - my_second_secret_name
  tasks:
    - debug: msg="secret:   {{ lookup('secretserver', 'my_secret_name') }}"
    - debug: msg="id:       {{ lookup('secretserver', 'my_secret_name.id') }}"
    - debug: msg="username: {{ lookup('secretserver', 'my_secret_name.username') }}"
    - debug: msg="password: {{ lookup('secretserver', 'my_secret_name.password') }}"
    - debug: msg="notes:    {{ lookup('secretserver', 'my_secret_name.notes') }}"

License Information

This plugin was created by Sven Meeus

The MIT License (MIT)

Copyright (c) 2018 Sven Meeus / Framed

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A custom Ansible lookup plugin to retrieve secret information from Thycotic Secret Server

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages