summaryrefslogtreecommitdiffstats
path: root/roles/password_store/tasks
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2025-11-09 00:23:04 +0100
committerAhmed Abdelhalim <[email protected]>2025-11-09 01:47:00 +0100
commit399826fd634e47134feb919b0ee0805035475fc4 (patch)
tree4222cb37b1a60a56795155a0e8a7c82a140b8dd9 /roles/password_store/tasks
parent8dfbe7c57da01ed63fd059f57b8c02102ad80720 (diff)
Add password_store role
Diffstat (limited to 'roles/password_store/tasks')
-rw-r--r--roles/password_store/tasks/main.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/password_store/tasks/main.yml b/roles/password_store/tasks/main.yml
new file mode 100644
index 00000000..72df297a
--- /dev/null
+++ b/roles/password_store/tasks/main.yml
@@ -0,0 +1,25 @@
+---
+- name: "Include OS-specific variables"
+ ansible.builtin.include_vars: "{{ ansible_os_family | lower }}.yml"
+
+- name: "Ensure pass packages are installed"
+ become: true
+ ansible.builtin.package:
+ name: "{{ password_store_packages }}"
+ state: "present"
+
+- name: "Add GitHub to known_hosts"
+ ansible.builtin.known_hosts:
+ name: "github.com"
+ key: "github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl"
+ path: "{{ ansible_env.HOME }}/.ssh/known_hosts"
+ state: present
+
+- name: "Clone password store git repo"
+ ansible.builtin.git:
+ repo: "{{ password_store_repo_url }}"
+ dest: "{{ ansible_env.HOME }}/.password-store"
+ clone: true
+ update: false
+ single_branch: true
+ version: main