added vault passwords for the become pass.

This commit is contained in:
Vuong Hoang
2024-06-02 11:12:12 -07:00
parent e411c46875
commit 4c4737a6d1
8 changed files with 25 additions and 2 deletions

View File

@@ -74,6 +74,7 @@
# (boolean) This controls whether an Ansible playbook should prompt for a vault password. # (boolean) This controls whether an Ansible playbook should prompt for a vault password.
;ask_vault_pass=False ;ask_vault_pass=False
ask_vault_pass=True
# (pathspec) Colon separated paths in which Ansible will search for Cache Plugins. # (pathspec) Colon separated paths in which Ansible will search for Cache Plugins.
;cache_plugins=/home/lkraven/.ansible/plugins/cache:/usr/share/ansible/plugins/cache ;cache_plugins=/home/lkraven/.ansible/plugins/cache:/usr/share/ansible/plugins/cache

View File

@@ -1,16 +1,23 @@
docker: docker:
hosts: hosts:
10.250.50.70: 10.250.50.70:
ansible_become_pass: '{{ std_become_pass }}'
10.0.50.45: 10.0.50.45:
ansible_become_pass: '{{ std_become_pass }}'
10.100.50.40: 10.100.50.40:
ansible_become_pass: '{{ std_become_pass }}'
db: db:
hosts: hosts:
10.0.50.60: 10.0.50.60:
ansible_become_pass: '{{ std_become_pass }}'
10.250.50.81: 10.250.50.81:
ansible_become_pass: '{{ std_become_pass }}'
10.250.50.80: 10.250.50.80:
ansible_become_pass: '{{ std_become_pass }}'
local: local:
hosts: hosts:
127.0.0.1: 127.0.0.1:
ansible_become_pass: '{{ std_become_pass }}'

View File

@@ -0,0 +1,6 @@
$ANSIBLE_VAULT;1.1;AES256
37616235663633663662623763323339356530363463636665343435653562333062663630376337
3333626636376236323435373432323764633062353533300a393432613363393233636337323164
31313638663464366663366637306262323833366339313538383430316464343238333639326637
3730656461666539380a343664393266353731376439626539613862343339396363303739663834
31393766323964633431303130616331353133613231306265393235323233343965

View File

@@ -1,4 +1,7 @@
---
- hosts: "*" - hosts: "*"
vars_files:
- '~/ansible/inventory/vaulted_vars.yaml'
become: yes become: yes
tasks: tasks:
- name: Install user default applications. tmux, vim-nox, btop, htop, neofetch - name: Install user default applications. tmux, vim-nox, btop, htop, neofetch

View File

@@ -1,4 +1,6 @@
- hosts: "*" - hosts: "*"
vars_files:
- '~/ansible/inventory/vaulted_vars.yaml'
become: yes become: yes
tasks: tasks:
- name: apt - name: apt

View File

@@ -1,4 +1,6 @@
- hosts: "*" - hosts: "*"
vars_files:
- '~/ansible/inventory/vaulted_vars.yaml'
become: yes become: yes
tasks: tasks:
- name: apt - name: apt

View File

@@ -1,3 +1,5 @@
- hosts: "all" - hosts: "all"
vars_files:
- '~/ansible/inventory/vaulted_vars.yaml'
roles: roles:
- starship - starship

View File

@@ -24,8 +24,8 @@ format = '[$time ]($style)'
style = "bold black" style = "bold black"
[fill] [fill]
symbol="_" symbol=""
style = "bold black underline" style = "bold black"
[hostname] [hostname]