To set up SSH agent to avoid retyping passwords, you can do:
$ ssh-agent bash
$ ssh-add ~/.ssh/id_rsa
ref: https://docs.ansible.com/ansible/latest/user_guide/connection_details.html
add in /etc/hosts
[ip] dev
[ip] db
ansible-playbook dev.yml db.yml -i inventory
Ansible: Unsupported parameters for (ansible.legacy.command) module: warn fix:
brew install ansible@6
refs: https://stackoverflow.com/questions/74544930/ansible-unsupported-parameters-for-ansible-legacy-command-module-warn https://medium.com/nerd-for-tech/install-old-versions-of-apps-with-ansible-and-homebrew-9ba612fa6679
---
all:
hosts:
dev:
hosts:
<ip>
db:
hosts:
<ip>
user: <user>
dev_ip: <ip>
db_ip: <ip>