add some rpm packages and more idempotency
This commit is contained in:
+9
-1
@@ -1,16 +1,22 @@
|
||||
---
|
||||
- name: Stat DuckDB CLI installation
|
||||
ansible.builtin.stat:
|
||||
path: /usr/local/bin/duckdb
|
||||
register: duckdb_installed_result
|
||||
|
||||
- name: Download DuckDB CLI
|
||||
ansible.builtin.get_url:
|
||||
url: "https://install.duckdb.org/v{{ duckdb_version }}/duckdb_cli-linux-amd64.gz"
|
||||
dest: /tmp/duckdb_cli-linux-amd64.gz
|
||||
mode: "0644"
|
||||
timeout: 300
|
||||
when: not duckdb_installed_result.stat.exists
|
||||
|
||||
- name: Install DuckDB CLI
|
||||
ansible.builtin.shell: gzip -dc /tmp/duckdb_cli-linux-amd64.gz > /usr/local/bin/duckdb
|
||||
args:
|
||||
executable: /bin/bash
|
||||
creates: /usr/local/bin/duckdb
|
||||
when: not duckdb_installed_result.stat.exists
|
||||
|
||||
- name: Make DuckDB executable
|
||||
ansible.builtin.file:
|
||||
@@ -18,8 +24,10 @@
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: root
|
||||
when: not duckdb_installed_result.stat.exists
|
||||
|
||||
- name: Remove DuckDB archive
|
||||
ansible.builtin.file:
|
||||
path: /tmp/duckdb_cli-linux-amd64.gz
|
||||
state: absent
|
||||
when: not duckdb_installed_result.stat.exists
|
||||
|
||||
Reference in New Issue
Block a user