File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 33#
44# Bootstrap (first time — fresh VPS, only root exists):
55# ansible-playbook playbook.yml -i inventory.local.ini -e @vars/local.yml \
6- # -e ansible_user=root --private-key ~/.ssh/id_rsa
7- # NOTE: -u root does NOT work — ansible_user in inventory is a host variable
8- # that overrides it. -e ansible_user=root uses extra-vars precedence instead.
9- # --private-key overrides ansible_ssh_private_key_file (abc_deploy != root key).
6+ # -e ansible_user=root \
7+ # -e ansible_ssh_private_key_file=~/.ssh/id_rsa
8+ # NOTE: -u/--user and --private-key are NOT enough — inventory host vars have
9+ # higher precedence. Override both with -e (extra vars beat host vars).
10+ # ansible_ssh_common_args has IdentitiesOnly=yes so only the named key is tried.
1011#
1112# All subsequent runs (root SSH is disabled after base role runs):
1213# ansible-playbook playbook.yml -i inventory.local.ini -e @vars/local.yml
You can’t perform that action at this time.
0 commit comments