Add gpg tasks

This commit is contained in:
Sonny Bakker 2021-01-25 22:38:29 +01:00
parent 24d69ee598
commit 8ea9414418
8 changed files with 361 additions and 11 deletions

View file

@ -0,0 +1,30 @@
- name: copy git configuration
template:
src: "gitconfig.j2"
dest: "{{ ansible_env.HOME }}/.gitconfig"
- name: copy keys
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
loop:
- {
src: "gpg_key", dest: "{{ ansible_env.HOME }}/gpg.key"
}
- {
src: "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"

View file

@ -4,7 +4,7 @@
name: "{{ packages }}"
- name: detecting platform
include_tasks: platform.yml
import_tasks: platform.yml
- name: install platform specific packages
become: yes
@ -12,7 +12,7 @@
name: "{{ platform_packages }}"
- name: configuring network
include_tasks: network.yml
import_tasks: network.yml
- name: copy reflector configuration
become: yes
@ -60,12 +60,10 @@
notify: restart powertop
when: platform == "laptop"
- include_tasks: systemd.yml
- include_tasks: openvpn.yml
- include_tasks: gpg.yml # TODO
- include_tasks: git.yml # TODO
- include_tasks: mpv.yml
- include_tasks: mpd.yml
- include_tasks: postgres.yml # TODO
- include_tasks: syncthing.yml
- include_tasks: timer.yml
- import_tasks: systemd.yml
- import_tasks: openvpn.yml
- import_tasks: git.yml
- import_tasks: mpv.yml
- import_tasks: mpd.yml
- import_tasks: syncthing.yml
- import_tasks: timer.yml