Compare commits

4 Commits

Author SHA1 Message Date
c72e1bb34f pass: configure passwordstore with remote 2020-11-05 20:25:27 +01:00
d2d2b2c845 bash: install autocompletion package 2020-11-05 20:23:35 +01:00
6f8ee3627d gnupg: ensure ssh uses gnupg-agent
Loads the gnupg_agent-skript in the ~/.bashrc, which exports
the needed variables (SSH_AUTH_SOCK, SSH_AGENT_PID, GPG_AGENT_INFO).

Also downloads the pubkey of the user and sets ownertrust on the key.

Fixes #3
2020-11-05 19:55:47 +01:00
cc609ade26 i3: template config for xfce4+i3 2020-09-18 22:08:40 +02:00
8 changed files with 63 additions and 8 deletions

8
i3.yml Normal file
View File

@ -0,0 +1,8 @@
---
- name: Template i3 config
hosts: all
become: true
roles:
- i3

View File

@ -0,0 +1,9 @@
---
- name: Install additional packages
package:
name: "{{ item }}"
state: present
loop:
- bash
- bash-completion

View File

@ -7,3 +7,4 @@ gpg_keygrips: []
gpg_folder: "~/.gnupg" gpg_folder: "~/.gnupg"
gpg_user: "{{ ansible_user }}"

View File

@ -38,8 +38,26 @@
dest: "{{ gpg_folder }}/gnupg_agent" dest: "{{ gpg_folder }}/gnupg_agent"
mode: 0700 mode: 0700
- name: Ensure gnupg_agent skript is included in .bashrc so SSH uses gpg-agent
blockinfile:
path: "~/.bashrc"
insertafter: "\[\[ \$- != \*i\* \]\] && return"
line: |
# load script telling SSH to use the gpg agent
source "{{ gpg_folder }}"/gnupg_agent
state: present
- name: Download own pubkey
get_url:
url: "https://git.finallycoffee.eu/{{ gpg_user }}/about/raw/branch/master/pubkey.asc"
dest: "~/{{ gpg_user }}.pub"
- name: Import own pubkey and set owner-trust
command:
cmd: |
gpg2 --no-tty --command-fd 0 --import ~/{{ gpg_user }}.pub << EOF
trust
5
quit
EOF

View File

@ -8,5 +8,4 @@ allow-freeform-uid
with-fingerprint with-fingerprint
keyid-format 0xlong keyid-format 0xlong
keyserver hkps://hkps.pool.sks-keyservers.net keyserver hkps://hkps.pool.sks-keyservers.net
#keyserver-options ca-cert-file=/home/electron/.gnupg/sks-keyservers_ca.pem
keyserver-options no-honor-keyserver-url keyserver-options no-honor-keyserver-url

View File

@ -4,6 +4,7 @@
package: package:
name: i3 name: i3
state: present state: present
ignore_errors: yes
- name: Ensure folder for configuration exists - name: Ensure folder for configuration exists
file: file:
@ -16,7 +17,3 @@
src: config.j2 src: config.j2
dest: ~/.config/i3/config dest: ~/.config/i3/config
- name: Create autostart entry
template:
src: ""
dest: ~/.config/autostart/i3.desktop

View File

@ -32,7 +32,7 @@ bindsym $mod+Shift+q kill
bindsym $mod+d exec xfce4-popup-whiskermenu bindsym $mod+d exec xfce4-popup-whiskermenu
# Lock the screen # Lock the screen
bindsym $mod+l exec i3lock bindsym $mod+l exec xflock4
# There also is the (new) i3-dmenu-desktop which only displays applications # There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that # shipping a .desktop file. It is a wrapper around dmenu, so you need that

View File

@ -0,0 +1,23 @@
---
- name: Install package
package:
name: pass
state: present
- name: Initialise password store
command:
cmd: "pass init {{ passwordstore_id }}"
- name: Set password store git upstream
command:
cmd: "pass git remote set origin ssh://git@git.finallycoffee.eu:8022/{{ ansible_user }}/password-store.git"
- name: Fetch upstream password store
command:
cmd: "pass git fetch --all"
- name: Set master to upstream master
command:
cmd: "pass git checkout -B master origin/master"