You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
586 B

  1. ---
  2. - name: Install pgbouncer
  3. apt:
  4. name: pgbouncer
  5. - name: Add pgbouncer.ini
  6. template:
  7. src: pgbouncer.ini.jinja2
  8. dest: /etc/pgbouncer/pgbouncer.ini
  9. owner: postgres
  10. group: postgres
  11. mode: 0640
  12. notify:
  13. - Reload pgbouncer
  14. - name: Add user to pgbouncer userlist
  15. lineinfile:
  16. path: /etc/pgbouncer/userlist.txt
  17. line: '"tildes" ""'
  18. create: true
  19. owner: postgres
  20. group: postgres
  21. mode: 0640
  22. notify:
  23. - Reload pgbouncer
  24. - name: Start and enable pgbouncer service
  25. service:
  26. name: pgbouncer
  27. state: started
  28. enabled: true