Skip to content

Commit 7d750a0

Browse files
committed
git: Removing 1pass. Need blockinfile now.
1 parent 2a0c825 commit 7d750a0

File tree

2 files changed

+11
-31
lines changed

2 files changed

+11
-31
lines changed

roles/git/files/allowed_signers

Lines changed: 0 additions & 10 deletions
This file was deleted.

roles/git/tasks/main.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,29 +114,19 @@
114114
state: directory
115115
mode: "0755"
116116

117-
- name: "Git | Read allowed_signers secret from 1Password"
118-
when: op_installed
119-
block:
120-
- name: "1Password | Get allowed_signers"
121-
ansible.builtin.command: "op read '{{ op.git.allowed_signers }}'"
122-
register: op_git_ssh_allowed_signers
123-
changed_when: false
124-
no_log: true
125-
126-
- name: "1Password | Configure ~/.config/git/allowed_signers"
127-
ansible.builtin.lineinfile:
128-
path: "{{ ansible_user_dir }}/.config/git/allowed_signers"
129-
line: "{{ op_git_ssh_allowed_signers.stdout }}"
130-
mode: "0600"
131-
create: true
132-
no_log: true
117+
- name: "1Password | Get allowed_signers"
118+
ansible.builtin.command: "op read '{{ op.git.allowed_signers }}'"
119+
register: op_git_ssh_allowed_signers
120+
changed_when: false
121+
no_log: true
133122

134-
- name: "Git | Configure ~/.config/git/allowed_signers"
135-
when: not op_installed
136-
ansible.builtin.copy:
137-
src: allowed_signers
138-
dest: "{{ ansible_user_dir }}/.config/git/allowed_signers"
123+
- name: "1Password | Configure ~/.config/git/allowed_signers"
124+
ansible.builtin.blockinfile:
125+
path: "{{ ansible_user_dir }}/.config/git/allowed_signers"
126+
block: "{{ op_git_ssh_allowed_signers.stdout }}"
139127
mode: "0600"
128+
create: true
129+
no_log: true
140130

141131
- name: "Git | Set gpg.ssh.allowedSignersFile"
142132
community.general.git_config:

0 commit comments

Comments
 (0)