Run ansible script without an inventory file
You can run playbooks against an ad-hoc server by using a trailing comma with an ip address:
ansible-playbook -i 172.20.221.131, pg.yml
# pg.yml
---
- hosts: all
remote_user: dillon
gather_facts: no
vars:
postgres_user: dillon
postgres_db: rails_app_development
pg_version: 15
...
Tweet