- name: Create temporary file for batch
  copy:
    src: templates/gpg.batch
    dest: /tmp/gpg.batch
    owner: wicksy
    group: wicksy
    mode: 0600

- name: Create keys for user
  command: gpg2 --batch --gen-key /tmp/gpg.batch
  args:
    creates: /home/wicksy/.gnupg/pubring.gpg
  become_user: wicksy

- name: Remove temp file
  file:
    path: /tmp/gpg.batch
    state: absent
Add role for gpg keys
Add role for gpg keys
