refactor: install ansible with Python venv (#863)
This commit is contained in:
1 parent
e4d1fa15d6
commit
571a7454c0
15 files changed
+85
-153
No files matched your search
@@ -1,18 +1,18 @@
|
||||
---
|
||||
- name: Query age key file
|
||||
ansible.builtin.stat:
|
||||
path: ~/.config/sops/age/keys.txt
|
||||
path: "{{ repository_path }}/age.key"
|
||||
register: result
|
||||
|
||||
- name: Check if age key file exists
|
||||
ansible.builtin.assert:
|
||||
that: result.stat.exists
|
||||
success_msg: Age file ~/.config/sops/age/keys.txt exists
|
||||
fail_msg: Age file ~/.config/sops/age/keys.txt does not exist
|
||||
success_msg: Age file {{ repository_path }}/age.key exists
|
||||
fail_msg: Age file {{ repository_path }}/age.key does not exist
|
||||
|
||||
- name: Query age key file contents
|
||||
ansible.builtin.set_fact:
|
||||
age_contents: "{{ lookup('file', '~/.config/sops/age/keys.txt') }}"
|
||||
age_contents: "{{ lookup('file', repository_path + '/age.key') }}"
|
||||
|
||||
- name: Check if age public keys match
|
||||
ansible.builtin.assert:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
- name: Check for required CLI tools
|
||||
ansible.builtin.shell: |
|
||||
command -v {{ item }} >/dev/null 2>&1
|
||||
loop: [age, cloudflared, flux, git, pip3, sops, task]
|
||||
loop: [age, cloudflared, flux, sops]
|
||||
changed_when: false
|
||||
check_mode: false
|
||||
register: result
|
||||
|
||||
Reference in new issue
Block a user