Skip to main content

DigDeo Syspass Ansible Lookup

Project description

coverage report pipeline status

digdeo-ansible-syspass

Module page: https://pypi.org/project/digdeo-syspass-ansible-lookup/ Documentation: https://www.readthedoc.io/digdeo-syspass-ansible-lookup Bug Tracker: https://gitdev.digdeo.fr/digdeo-projets-floss1/digdeo-syspass-ansible-lookup/issues

##Introduction digdeo-ansible-syspass is a ansible lookup plugin write in python.

That program is a ansible plugin interface it use digdeo-syspass-client to dialog with the syspass API.

It plugin is dedicated to lookup password's from a syspass server.

INSTALLATION:

Normal installation

python3 -m venv venv
. venv/bin/activate
pip install digdeo-syspass-ansible-lookup

Force a Ansible version

python3 -m venv venv
. venv/bin/activate
pip install wheel "ansible == 2.7.13"
pip install digdeo-syspass-ansible-lookup

Force libxml

On Linux (and most other well-behaved operating systems), pip will manage to build the source distribution as long as libxml2 and libxslt are properly installed, including development packages, i.e. header files, etc. See the requirements section above and use your system package management tool to look for packages like libxml2-dev or libxslt-devel. If the build fails, make sure they are installed.

Alternatively, setting STATIC_DEPS=true will download and build both libraries automatically in their latest version, e.g.

STATIC_DEPS=true pip install lxml.

Note that module use digdeo-syspass-client module https://pypi.org/project/digdeo-syspass-client/ Please pay attention about config.yml file.

DISCLAIMER:
This module has been heavily inspired by https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/lookup/password.py for password generation and term handling and thus is under GPL.

lookup: syspass
author: Gousseaud Gaëtan <gousseaud.gaetan.pro@gmail.com>, Pierre-Henry Muller <pierre-henry.muller@digdeo.fr>
short_description: get syspass user password and syspass API client
description:
- This lookup returns the contents from Syspass database, a user's password more specificly. Other functions are also implemented for further use.
ansible_version: ansible 2.6.2 with mitogen
python_version: 2.7.9
syspass_version: 3.0 Beta (300.18082701)

Parameters:

notes:

IN PLAYBOOK

NOTE: Default values are handled

USAGE 1
    - name: SysPass | Minimal test | get and if not exist insert
      debug:
        msg: "{{ lookup('syspass', 'Account Name minimal', login='mylogin', category='MySQL', customer='PREP') }}"
      register: pass1
      changed_when: false

    - name: SysPass | Minimal test | get and compare
      debug:
        msg: "{{ lookup('syspass', 'Account Name minimal', login='mylogin', category='MySQL', customer='PREP') }}"
      register: pass2
      changed_when: pass1.msg == pass2.msg
      failed_when: pass1.msg != pass2.msg

Authors: Gousseaud Gaëtan gousseaud.gaetan.pro@gmail.com Pierre-Henry Muller pierre-henry.muller@digdeo.fr Jérôme Ornech i.dont.share.my.mail@nothing.fr

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

digdeo-syspass-ansible-lookup-0.2.3.tar.gz (16.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page