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.

42 lines
858 B

  1. ---
  2. - name: Install pgbouncer
  3. apt:
  4. name: pgbouncer
  5. - name: Remove pgbouncer from init.d (may conflict with systemd service)
  6. file:
  7. path: /etc/init.d/pgbouncer
  8. state: absent
  9. when: is_docker
  10. - name: Update rc.d to reflect init.d removal
  11. command:
  12. cmd: update-rc.d pgbouncer remove
  13. when: is_docker
  14. - name: Add pgbouncer.ini
  15. template:
  16. src: pgbouncer.ini.jinja2
  17. dest: /etc/pgbouncer/pgbouncer.ini
  18. owner: postgres
  19. group: postgres
  20. mode: 0640
  21. notify:
  22. - Reload pgbouncer
  23. - name: Add user to pgbouncer userlist
  24. lineinfile:
  25. path: /etc/pgbouncer/userlist.txt
  26. line: '"tildes" ""'
  27. create: true
  28. owner: postgres
  29. group: postgres
  30. mode: 0640
  31. notify:
  32. - Reload pgbouncer
  33. - name: Start and enable pgbouncer service
  34. systemd_service:
  35. name: pgbouncer
  36. state: started
  37. enabled: true