--- {%- from "clickhouse-backup/map.jinja" import clickhousebackup with context %} clickhouse-backup-archive-extract: archive.extracted: - name: {{ clickhousebackup.release_dir }}/clickhouse-backup-{{ clickhousebackup.version }} - source: {{ clickhousebackup.mirror }}/v{{ clickhousebackup.version }}/clickhouse-backup-{{ clickhousebackup.os }}-{{ clickhousebackup.arch }}.tar.gz - enforce_toplevel: false - options: > --strip 3 - skip_verify: true - archive_format: tar - if_missing: {{ clickhousebackup.release_dir }}/clickhouse-backup-{{ clickhousebackup.version }}/clickhouse-backup clickhouse-backup-bin-perm: file.managed: - name: {{ clickhousebackup.release_dir }}/clickhouse-backup-{{ clickhousebackup.version }}/clickhouse-backup - user: root - group: root - replace: False - require: - archive: clickhouse-backup-archive-extract clickhouse-backup-bin-symlink: file.symlink: - name: /usr/local/sbin/clickhouse-backup - target: {{ clickhousebackup.release_dir }}/clickhouse-backup-{{ clickhousebackup.version }}/clickhouse-backup - user: root - group: root - mode: 0755 - force: true - require: - archive: clickhouse-backup-archive-extract clickhouse-backup-cleanup: software.cleanup: - name: clickhouse-backup - path: {{ clickhousebackup.release_dir }} - version: "{{ clickhousebackup.version }}"