feat: add {add,remove}-copybara-credential-store roles
Change-Id: I4f054ceb410b3082b109a5c24e3e9a8105c6c169
diff --git a/roles/add-copybara-credential-store/defaults/main.yaml b/roles/add-copybara-credential-store/defaults/main.yaml
new file mode 100644
index 0000000..db10a19
--- /dev/null
+++ b/roles/add-copybara-credential-store/defaults/main.yaml
@@ -0,0 +1 @@
+filename: "~/.git-credentials"
diff --git a/roles/add-copybara-credential-store/tasks/main.yaml b/roles/add-copybara-credential-store/tasks/main.yaml
new file mode 100644
index 0000000..f42e75e
--- /dev/null
+++ b/roles/add-copybara-credential-store/tasks/main.yaml
@@ -0,0 +1,4 @@
+- name: Create git credential store
+ ansible.builtin.template:
+ src: "git-credentials.j2"
+ dest: "{{ filename }}"
diff --git a/roles/add-copybara-credential-store/templates/git-credentials.j2 b/roles/add-copybara-credential-store/templates/git-credentials.j2
new file mode 100644
index 0000000..d3a3024
--- /dev/null
+++ b/roles/add-copybara-credential-store/templates/git-credentials.j2
@@ -0,0 +1 @@
+{{ git_credentials }}
diff --git a/roles/add-copybara-credential-store/vars/main.yaml b/roles/add-copybara-credential-store/vars/main.yaml
new file mode 100644
index 0000000..5a59792
--- /dev/null
+++ b/roles/add-copybara-credential-store/vars/main.yaml
@@ -0,0 +1 @@
+git_credentials: ""