dd-ansible-syspass
==================
[![coverage report](https://git.digdeo.fr/digdeo-system/dd-ansible-syspass/badges/master/coverage.svg)](https://git.digdeo.fr/digdeo-system/dd-ansible-syspass/commits/master) [![pipeline status](https://git.digdeo.fr/digdeo-system/dd-ansible-syspass/badges/master/pipeline.svg)](https://git.digdeo.fr/digdeo-system/dd-ansible-syspass/commits/master)
**INSTALLATION:**<br>
Module page: https://pypi.org/project/digdeo-syspass-ansible-lookup/
**Normal installation**
```shell script
python3 -m venv venv
. venv/bin/activate
pip install digdeo-syspass-ansible-lookup
```
**Force a Ansible version**
```shell script
python3 -m venv venv
. venv/bin/activate
pip install wheel "ansible == 2.7.13"
pip install digdeo-syspass-ansible-lookup
```
Note that module use digdeo-syspass-client module https://pypi.org/project/digdeo-syspass-client/
Please pay attention about config.yml file.
**DISCLAIMER:**<br>
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)
params:
------
- **term**: the account name (required and must be unique)
- **login**: login given to created account
- **category**: category given to created account
- **customer**: client given to created account
- **state**: like in Ansible absent to remove the password, present in default to create (Optional)
- **pass_length**: generated password length (Optional)
- **chars**: type of chars used in generated (Optional)
- **url**: url given to created account (Optional)
- **notes**: notes given to created account (Optional)
- **private**: is this password private for users who have access or public for all users in acl (default false)
- **privategroup**: is private only for users in same group (default false)
- **expirationDate**: expiration date given to created account (Optional) and not tested (no entry in webui)
notes:
-----
- Account is only created if exact name has no match.
- A different field passed to an already existing account wont modify it.
- Utility of tokenPass: https://github.com/nuxsmin/sysPass/issues/994#issuecomment-409050974
- Rudimentary list of API accesses (Deprecated): https://github.com/nuxsmin/sysPass/blob/d0056d74a8a2845fb3841b02f4af5eac3e4975ed/lib/SP/Services/Api/ApiService.php#L175
- Usage of ansible vars: https://github.com/ansible/ansible/issues/33738#issuecomment-350819222
syspass function list:
SyspassClient:
Account:
-AccountSearch
-AccountViewpass
-AccountCreate
-AccountDelete
-AccountView
Category:
-CategorySearch
-CategoryCreate
-CategoryDelete
Client:
-ClientSearch
-ClientCreate
-ClientDelete
Tag:
-TagCreate
-TagSearch
-TagDelete
UserGroup:
- UserGroupCreate
- UserGroupSearch
- UserGroupDelete
Others:
-Backup
### IN HOST VARS ###
syspass_API_URL: http://syspass-server.net/api.php
syspass_API_KEY: 'API_KEY' #Found in Users & Accesses -> API AUTHORIZATION -> User token
syspass_API_ACC_TOKPWD: Password for API_KEY for Account create / view / delete password account permission in API
syspass_default_length: number of chars in password
### IN PLAYBOOK ###
NOTE: Default values are handled
##### USAGE 1 #####
- name: Minimum declaration to get / create password
local_action: debug msg="{{ lookup('syspass', 'Server 1 test account', login=test, category='MySQL', customer='Customer 1') }}"
- name: All details for password declaration
local_action: debug msg="{{ lookup('syspass', 'Server 1 test account', login=test, category='MySQL', customer='Customer 1',
url='https://exemp.le', notes='Additionnal infos', private=True, privategroupe=True) }}"
- name: Minimum declaration to delete password
local_action: debug msg="{{ lookup('syspass', 'Server 1 test account', state=absent) }}"
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共12个文件
txt:4个
pkg-info:2个
py:2个
资源分类:Python库 所属语言:Python 资源全名:digdeo-syspass-ansible-lookup-0.1.1.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
digdeo-syspass-ansible-lookup-0.1.1.tar.gz (12个子文件)
digdeo-syspass-ansible-lookup-0.1.1
MANIFEST.in 41B
PKG-INFO 6KB
ansible
plugins
lookup
syspass.py 43KB
digdeo_syspass_ansible_lookup.egg-info
PKG-INFO 6KB
requires.txt 34B
not-zip-safe 1B
SOURCES.txt 390B
top_level.txt 31B
dependency_links.txt 1B
setup.cfg 76B
setup.py 3KB
README.md 5KB
共 12 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 12w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功