Go to file
2024-12-19 22:44:32 +01:00
DOC update.. 2024-08-08 00:27:09 +02:00
files/homedirs update.. 2024-04-04 20:11:31 +02:00
group_vars update.. 2024-12-19 22:44:32 +01:00
host_vars update.. 2024-12-19 22:44:32 +01:00
roles update.. 2024-12-19 22:44:32 +01:00
scripts mv firewall scripts to roles. 2020-05-16 16:45:17 +02:00
.gitignore Initial commit 2019-06-28 02:28:50 +02:00
ansible-dependencies-bookworm-sudo.yml update.. 2023-06-16 20:43:34 +02:00
ansible-dependencies-bookworm.yml update.. 2023-06-16 20:43:34 +02:00
ansible-dependencies-bullseye-sudo.yml update.. 2023-04-06 11:53:54 +02:00
ansible-dependencies-bullseye.yml update.. 2023-04-06 11:53:54 +02:00
ansible-dependencies-centos-7-sudo.yml update.. 2023-04-06 11:53:54 +02:00
ansible-dependencies-centos-7.yml update.. 2023-04-06 11:53:54 +02:00
ansible-dependencies-sudo.yml Initial commit 2019-06-28 02:28:50 +02:00
ansible-dependencies.yml Initial commit 2019-06-28 02:28:50 +02:00
ansible.cfg update.. 2021-07-08 18:56:07 +02:00
common.yml update.. 2024-12-04 17:57:55 +01:00
decrypt-vault-strings-from-file.sh update.. 2024-11-17 01:30:15 +01:00
extra-run.yml Initial commit 2019-06-28 02:28:50 +02:00
firewall.yml Move firewall script to roles. Adjust hosts. .. 2019-09-04 04:04:57 +02:00
hosts update.. 2024-12-19 22:44:32 +01:00
hosts.BAK decrypt file 'hosts'. 2024-11-05 22:15:29 +01:00
initial-setup-sudo.yml Initial commit 2019-06-28 02:28:50 +02:00
initial-setup.yml Initial commit 2019-06-28 02:28:50 +02:00
install_amavis.conf.j2 update.. 2024-08-02 17:25:47 +02:00
main.yml update.. 2024-04-04 20:11:31 +02:00
modify-ipt-gateway-ro.yml mv firewall scripts to roles. 2020-05-16 16:45:17 +02:00
modify-ipt-gateway.yml mv firewall scripts to roles. 2020-05-16 16:45:17 +02:00
modify-ipt-server.yml mv firewall scripts to roles. 2020-05-16 16:45:17 +02:00
modify-munin-ip.yml updatre.. 2022-06-15 02:10:25 +02:00
network-setup.yml Initial commit 2019-06-28 02:28:50 +02:00
open_the_vault.sh Move firewall script to roles. Adjust hosts. .. 2019-09-04 04:04:57 +02:00
README.bond update.. 2022-01-18 11:07:14 +01:00
README.vault update.. 2024-11-17 01:30:15 +01:00
rolesset_permissions_samba_shares.conf.j2 Update.. 2020-10-28 02:38:09 +01:00
test-01.sh update.. 2024-11-17 01:30:15 +01:00
test.sh update.. 2024-11-17 01:30:15 +01:00
test.yml Initial commit 2019-06-28 02:28:50 +02:00
upgrade.yml Initial commit 2019-06-28 02:28:50 +02:00
vars_encrypted.yml update.. 2024-11-17 01:30:15 +01:00
webserver.yml Initial commit 2019-06-28 02:28:50 +02:00

# ====================
# Encrypting content with Ansible Vault
# ====================

# see:
#     https://docs.ansible.com/ansible/latest/vault_guide
#
#     https://docs.ansible.com/ansible/latest/vault_guide/vault_encrypting_content.html

# ----------
# encrypt / decrypt variables / strings
# ---------

# encrypt string
#
string=nSLIgazSj8DLu2Sy0l


ansible-vault encrypt_string $string && echo

# output of the above command is:
#
!vault |
          $ANSIBLE_VAULT;1.1;AES256
          33656466386662303431383037386564666466643364376233623261346235363866656438396532
          6161373832366430653235343034653166303561383934390a666432356463386461656363303234
          61386330643664666539343336313666346261323435386264396137366533626539396434303463
          3961666632646337360a666662323063316134623332333239616332343939326331383632646139
          66316333653232383764376264616238323861323530343734653564393737386139


# decrypt the encrypted string:
#
echo -e '$ANSIBLE_VAULT;1.1;AES256
33656466386662303431383037386564666466643364376233623261346235363866656438396532
6161373832366430653235343034653166303561383934390a666432356463386461656363303234
61386330643664666539343336313666346261323435386264396137366533626539396434303463
3961666632646337360a666662323063316134623332333239616332343939326331383632646139
66316333653232383764376264616238323861323530343734653564393737386139' | ansible-vault decrypt && echo

# output shoud be:
#
Decryption successful
nSLIgazSj8DLu2Sy0l


# ----------
# encrypt / decrypt file
# ----------

ansible-vault encrypt <file-name>

ansible-vault decrypt <file-name>