Run ansible from local machine

1)In ./ansible.cfg

remove -o PreferredAuthentications=publickey from string

ssh_args = -o ForwardAgent=yes -o StrictHostKeyChecking=no -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey

Save file

2. Run playbook with -u root and --ask-pass parameters

ansible-playbook linux_banners.yml -i inventory/stage/s001/s001.ini --limit s001xarc001* -u root --ask-pass

There can be problem in zsh with * symbol. It can be mirrored

 ansible-playbook im.yaml -i inventory/prod/prod.ini --limit site-migration-node2\* -u dgorohov -e "task=install"

Last updated

Was this helpful?