Complete ansible toolkit with generation and validation capabilities
97
97%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Advisory
Suggest reviewing before use
A data engineering team needs to run a database schema migration across a fleet of postgres_servers. The migration script at /opt/migrations/run_migration.sh typically takes 15 to 45 minutes per server. When the team ran a previous migration synchronously, Ansible timed out and left servers in inconsistent states.
The team also needs to manage the pg_hba.conf access rules file using the community.postgresql collection (specifically community.postgresql.postgresql_pg_hba module) after the migration completes to add a new application user access rule.
The playbook must:
pg_hba.conf with a new entry allowing app_user from 10.0.0.0/8 via md5 authentication.The servers run RHEL 9. Assume the necessary Python bindings are available.
Produce a complete Ansible playbook file named run_db_migration.yml. The playbook should include proper documentation of any collection dependencies.