Use simpler file structure

This commit is contained in:
Sonny Bakker 2021-01-29 21:05:40 +01:00
parent 8ea9414418
commit d5ca1ac81d
74 changed files with 398 additions and 477 deletions

26
tasks/git.yml Normal file
View file

@ -0,0 +1,26 @@
- name: copy git configuration
template:
src: 'templates/gitconfig.j2'
dest: '{{ ansible_env.HOME }}/.gitconfig'
- name: copy keys
copy:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
loop:
- { src: 'files/gpg_key', dest: '{{ ansible_env.HOME }}/gpg.key' }
- { src: 'files/gpg_pub', dest: '{{ ansible_env.HOME }}/gpg.pub' }
- name: import secret key
command: 'gpg --passphrase {{ gpg_passphrase }} --import ~/gpg.key'
- name: import public key
command: 'gpg --import ~/gpg.pub'
- name: remove temp keys
file:
path: '{{ item }}'
state: absent
loop:
- '{{ ansible_env.HOME }}/gpg.key'
- '{{ ansible_env.HOME }}/gpg.pub'