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) }}"
挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
最新资源
- 苹果叶病害图像分类数据集13类别:健康苹果叶、花叶病、叶斑病、白粉病、疮痂病、褐斑病、灰斑病、锈病、铁锈病、雪松锈病、马赛克病、斑点落叶病、蛙眼叶斑病(1.2万张图片).rar
- 路标标志检测25-YOLO(v5至v11)、COCO、CreateML、Paligemma数据集合集.rar
- 【机器学习实战】 kaggle贷款批准预测 (使用xgboost解决正负样本不平衡问题)
- 金融科技指数-根据百度指数构建(2011-2022年).zip
- 全自动啤酒灌装线 sw19可编辑全套技术资料100%好用.zip
- (23198816)matlab开发-OFDMwith16QAM
- (25826222)Hadoop开发环境搭建bin
- (26123810)基于51单片机数码管时钟显示与仿真原理图
- (26367618)error: Microsoft Visual C++ 14.0 or greater is required. BUG解决包!
- 基于51单片机的扫地小车,扫地机器人设计 有原理图,程序代码,原文 可做实物 主要功能有寻迹避障,来回清扫功能,往返清扫功能
- (28282834)Android期末大作业.rar
- (29858226)虚拟机安装Hadoop集群(3个集群).doc
- klicky-macros.cfg
- (3398226)数学建模经典算法集.rar
- 各地区-对外经济贸易19个指标(1992-2022年).zip
- 基于SSM和Vue的勤工助学管理系统
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈