main #31

Merged
juan merged 154 commits from main into lab 2024-10-16 15:22:43 +00:00
7 changed files with 33 additions and 4 deletions
Showing only changes of commit 210edd5b79 - Show all commits

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
.vscode/
.vaultpass
.pyenv

View File

@ -9,6 +9,18 @@ Instal Ansible on Debian.
apt install ansible
```
Install dependencies.
```
ansible-galaxy collection install -r collections/requirements.yml
```
Create Python virtual environment.
```
python3 -m venv .pyenv
source .pyenv/bin/activate
pip install -r requirements.txt
```
## Run playbook
Before merging changes into protected branches, playbooks should be tested
@ -45,3 +57,5 @@ be used, it is ovelay over the original *ansible-playbook* command.
* https://docs.ansible.com/ansible/latest/reference_appendices/config.html
* https://docs.ansible.com/ansible/latest/collections/ansible/builtin/gather_facts_module.html
* https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html
* https://www.passbolt.com/blog/managing-secrets-in-ansible-using-passbolt
* https://galaxy.ansible.com/ui/repo/published/anatomicjc/passbolt/

View File

@ -2,7 +2,7 @@
remote_user = root
host_key_checking = False
roles_path = ./roles
inventory = ./inventories/production
inventory = ./inventories/servers
gathering = smart
interpreter_python = auto_silent

View File

@ -1,8 +1,8 @@
## Collections
The purpose of collections is get more modules and plugins to use in ansible.
Collections are supported by Ansible community.
The purpose of collections is get more modules and plugins to use in ansible.
Place your collection dependencies here in *requirements.yml* and AWX will
install them automtatically.
# Install collections

View File

@ -11,3 +11,6 @@ collections:
- name: ansible.windows
version: '>=2.3.0'
type: galaxy
- name: anatomicjc.passbolt
version: '>=0.0.14'
type: galaxy

10
playbooks/passbolt.yml Normal file
View File

@ -0,0 +1,10 @@
- name: Fetch passbolt password
hosts: all
gather_facts: no
tasks:
- name: Print password
debug:
msg: "Variable: {{ lookup(passbolt, 'test') }}"
vars:
passbolt: 'anatomicjc.passbolt.passbolt'
passbolt_inventory: 'anatomicjc.passbolt.passbolt_inventory'

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
py-passbolt==0.0.18