mirror of
https://github.com/status-im/infra-nimbus.git
synced 2025-02-22 02:18:06 +00:00
ansible: add become_pass.sh, persistent connections
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
e518982349
commit
f41b4af98a
@ -5,8 +5,10 @@ remote_user = admin
|
||||
inventory = ./ansible/terraform.py
|
||||
callback_plugins = ./ansible/callback_plugins
|
||||
lookup_plugins = ./ansible/lookup_plugins
|
||||
become_password_file = ./ansible/become_pass.sh
|
||||
module_name = shell
|
||||
host_key_checking = false
|
||||
use_persistent_connections = true
|
||||
# human-readable stdout/stderr results display
|
||||
stdout_callback = debug
|
||||
# Avoid default Python warnings
|
||||
@ -21,6 +23,9 @@ become_user = root
|
||||
[ssh_connection]
|
||||
# this should speed up exection but might cause issues with sudo
|
||||
pipelining = True
|
||||
control_path = /tmp/ansible-ssh-%%h-%%p-%%r
|
||||
# necessary for cloning private git repos
|
||||
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes -o ConnectTimeout=360
|
||||
|
||||
[persistent_connection]
|
||||
command_timeout = 60
|
||||
connect_retry_timeout = 30
|
||||
|
3
ansible/become_pass.sh
Executable file
3
ansible/become_pass.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
# Used via BECOME_PASSWORD_FILE to avoid re-evaluation on every task.
|
||||
pass hosts/admin-pass
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
# Passwords
|
||||
ansible_become_password: '{{lookup("passwordstore", "hosts/admin-pass")}}'
|
||||
bootstrap__active_users_passwords: '{{ bootstrap__active_users | get_user_passwords }}'
|
||||
bootstrap__admin_pass: '{{lookup("vault", "users", field="admin", env="all", stage="all")}}'
|
||||
bootstrap__root_pass: '{{lookup("vault", "users", field="root", env="all", stage="all")}}'
|
||||
|
Loading…
x
Reference in New Issue
Block a user