chore(ansible): small additions

This commit is contained in:
Michele Cereda
2025-02-21 00:19:22 +03:00
parent 68962ff22a
commit b8a4c7020f
2 changed files with 3 additions and 0 deletions

View File

@@ -109,6 +109,7 @@ ansible-vault view 'ssh.key.pub' --vault-password-file 'password_file.txt'
ansible-vault edit 'ssh.key.pub'
ANSIBLE_VAULT_PASSWORD_FILE='password_file.txt' ansible-vault decrypt --output '.ssh/id_rsa' 'ssh.key'
diff 'some_role/files/ssh.key.plain' <(ansible-vault view --vault-password-file 'password_file.txt' 'some_role/files/ssh.key.enc')
echo -e '$ANSIBLE_VAULT;1.1;AES256\n386462…86436' | ansible-vault decrypt --ask-vault-password
# List available plugins
ansible-doc -t 'lookup' -l

View File

@@ -98,6 +98,8 @@
first_substr_matching_regex: "{{ 'sator arepo tenet opera rotas' | regex_search('\\stenet\\s') }}"
value_from_json_string_in_module_output: >-
{{ 'ansible_job_id' | extract(module_output | regex_search('{.*}') | from_json) }}
base64_encoded_string: "{{ 'some string' | ansible.builtin.b64encode }}"
base64_decoded_string: "{{ 'c29tZSBzdHJpbmc=' | ansible.builtin.b64decode }}"
- name: Manipulate lists
tags: list_manipulation
block: