ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

main.yml (873B)


      1 ---
      2 
      3 - name: Copy systemd node exporter environment file
      4   template:
      5     src: sysconfig.node_exporter.j2
      6     dest: /etc/default/prometheus-node-exporter
      7     owner: root
      8     group: root
      9     mode: 0644
     10   notify:
     11     - Restart node exporter
     12 
     13 - name: Copy systemd postgres exporter environment file
     14   template:
     15     src: sysconfig.postgres_exporter.j2
     16     dest: /etc/default/prometheus-postgres-exporter
     17     owner: root
     18     group: root
     19     mode: 0644
     20   when: inventory_hostname in groups.debops_service_postgresql_server
     21   notify:
     22     - Restart postgres exporter
     23 
     24 - name: Run postgres exporter as the postgres user
     25   lineinfile:
     26     path: /etc/systemd/system/multi-user.target.wants/prometheus-postgres-exporter.service
     27     regexp: '^User= '
     28     line: User=postgres
     29   when: inventory_hostname in groups.debops_service_postgresql_server
     30   notify:
     31     - Restart postgres exporter