Skip to content
Snippets Groups Projects
Select Git revision
  • f919ced4b2b2eac1fcbeb32c5f2bc2f8be9f1838
  • master default protected
  • th/caddy-wip
  • th/caddy
  • th/lego
  • th/acmebot
  • pyzabbix
  • th/keycloak
8 results

mysql.yml

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    main.yml 1.06 KiB
    ---
    
    - name: ensure postgres packages are installed
      apt:
        name:
          - postgresql
          - python-psycopg2
          - python3-psycopg2
          - libpq-dev
        state: present
      tags:
        - postgres
    
    - name: ensure postgres is started
      service:
        name: postgresql
        state: started
        enabled: true
      tags:
        - postgres
    
    - name: ensure we have rsnapshot
      apt:
        name: rsnapshot
        state: present
      tags:
        - postgres
        - rsnapshot
        - backup
    
    - name: ensure we have our postgres backup script
      copy:
        src: pgbackup.sh
        dest: /usr/local/bin/
        owner: root
        group: root
        mode: '0755'
      tags:
        - postgres
        - rsnapshot
        - backup
    
    - name: ensure we have our rsnapshot config
      template:
        src: rsnapshot.conf.j2
        dest: /etc/
        owner: root
        group: root
        mode: '0644'
      tags:
        - postgres
        - rsnapshot
        - backup
    
    - name: ensure rsnapshot is running regularly
      template:
        src: crontab.j2
        dest: /etc/cron.d/postgres-snapshot
        owner: root
        group: root
        mode: '0644'
      tags:
        - postgres
        - rsnapshot
        - backup