I have a process which runs a psql
process in ansible
- name: Run psql to pull in initial config data
become_method: sudo
become: yes
become_user: postgres
shell: psql -U postgres -w eclaim < /opt/eclaim_revamp/sql_scripts/{{ item }}.sql
with_items:
- initial_config
- initial_sql_script
- tmp_hrms
This task runs all the time. How do I make this idempotent ?