Skip to content

qev0/ansible_scripts

Repository files navigation

ansible_scripts

Generic badge

Description

Various personally customized ansible scripts for my own personal infrastructure, can be used standalone or in conjuction with kvm-install-vm and bootstrap.py

~/.ansible.cfg

if using inventory.yml via bootstrap.py then this will already by configured.

    $ cat ~/.ansible.cfg
    [defaults]
    remote_user=
    host_key_checking = False
    [ssh_connection]
    scp_if_ssh = True
    ssh_args = -o ControlMaster=auto -o ControlPersist=60m
    [privilege_escalation]
    become=True
    become_method=sudo
    become_user=${ANSIBLE_USER}
    become_ask_pass=False

NOTE!

  1. defaults.yml is the default location for various variables that should remain encrypted (api keys, ssh keys, config urls, etc)
  2. It also contains default variables for various roles implemented throughout certain playbooks, documentation for which can be seen via Ansible Galaxy
  3. Strings encrypted with ansible-vault encrypt_string --vault-id ${VAULT_FILE} '<string to encrypt>'

Convenient way to decrypt on the fly

$ snap install yq
$ yq read playbook.yml encrypted_value | ansible-vault --vault-id vault-password decrypt
Decryption successful
mysecretstring

Running manually...:

cd ~/ansible_scripts
ansible-playbook --vault-id ${VAULT_FILE} playbook.yml

About

Various personally customized ansible scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors