dotfiles/roles/gnupg/tasks/main.yml

42 lines
868 B
YAML
Raw Normal View History

---
# Installs GnuPG2 and templates the configs
- name: Install gnupg (RedHat*)
2019-05-02 17:39:41 +00:00
package:
name: gnupg2
state: latest
when: ansible_os_family == "RedHat"
- name: Install gnupg (Arch)
2019-05-02 17:39:41 +00:00
package:
name: gnupg
state: latest
when: ansible_os_family == "Archlinux"
- name: Configure gpg.conf (behaviour of gpg)
2019-05-02 17:39:41 +00:00
template:
src: gpg.conf.j2
2019-05-05 17:07:14 +00:00
dest: "{{ gpg_folder }}/gpg.conf"
- name: Configure gpg-agent.conf (agent configuration)
2019-05-02 17:39:41 +00:00
template:
src: gpg-agent.conf.j2
2019-05-05 17:07:14 +00:00
dest: "{{ gpg_folder }}/gpg-agent.conf"
- name: Configure ssh-control (in order for gpg-agent to act as ssh-agent)
2019-05-02 17:39:41 +00:00
template:
src: sshcontrol.j2
dest: "{{ gpg_folder }}/sshcontrol"
- name: Copy gnupg_agent script, which makes gpg-agent responsible for ssh-auth
template:
src: gnupg_agent.j2
dest: "{{ gpg_folder }}/gnupg_agent"
mode: 0700