Compare commits
No commits in common. "476ea6a83f177c1ffc50bae4c63a29b77b1a8c12" and "15c552fe4e4877889fa40f68844660191176d14a" have entirely different histories.
476ea6a83f
...
15c552fe4e
@ -2,14 +2,7 @@
|
|||||||
alias ll='ls -al --color=auto'
|
alias ll='ls -al --color=auto'
|
||||||
alias ls='ls -l --color=auto'
|
alias ls='ls -l --color=auto'
|
||||||
|
|
||||||
alias nb=man
|
|
||||||
alias enby=man
|
|
||||||
|
|
||||||
alias furryfox=firefox
|
|
||||||
|
|
||||||
alias flauschctl=systemctl
|
|
||||||
|
|
||||||
# GnuPG2
|
# GnuPG2
|
||||||
alias gpg=gpg2
|
alias gpg=gpg2
|
||||||
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Sets up gpg and the configs for using it as a ssh-agent
|
|
||||||
#connection: local
|
|
||||||
hosts: gnupg
|
|
||||||
become: true
|
|
||||||
roles:
|
|
||||||
- gnupg
|
|
@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
all:
|
|
||||||
hosts:
|
|
||||||
xenon:
|
|
||||||
ansible_host: xenon.int.finallycoffee.eu
|
|
||||||
ansible_connection: local
|
|
||||||
vars:
|
|
||||||
ansible_user: transcaffeine
|
|
||||||
ansible_become_user: transcaffeine
|
|
||||||
ansible_become: true
|
|
||||||
|
|
||||||
gnupg:
|
|
||||||
hosts:
|
|
||||||
xenon:
|
|
||||||
|
|
||||||
redshift:
|
|
||||||
hosts:
|
|
||||||
xenon:
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Sets up redshift and creates an autostart file
|
|
||||||
hosts: redshift
|
|
||||||
become: true
|
|
||||||
roles:
|
|
||||||
- redshift
|
|
@ -5,5 +5,3 @@ gpg_cache_ttl_ssh: 300
|
|||||||
# Array of all keygrips to pass to sshcontrol
|
# Array of all keygrips to pass to sshcontrol
|
||||||
gpg_keygrips: []
|
gpg_keygrips: []
|
||||||
|
|
||||||
gpg_folder: "~/.gnupg"
|
|
||||||
|
|
||||||
|
14
roles/gnupg/files/gnupg_agent
Executable file
14
roles/gnupg/files/gnupg_agent
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rc=$(pgrep gpg-agent)
|
||||||
|
if [ "$rc" != 0 ]; then
|
||||||
|
export GPG_AGENT_INFO
|
||||||
|
export SSH_AUTH_SOCK
|
||||||
|
export SSH_AGENT_PID
|
||||||
|
else
|
||||||
|
eval $(gpg-agent --daemon)
|
||||||
|
fi
|
||||||
|
|
||||||
|
gpg-connect-agent /bye
|
||||||
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
|
|
@ -2,40 +2,27 @@
|
|||||||
# Installs GnuPG2 and templates the configs
|
# Installs GnuPG2 and templates the configs
|
||||||
|
|
||||||
- name: Install gnupg (RedHat*)
|
- name: Install gnupg (RedHat*)
|
||||||
package:
|
yum: name=gnupg2 state=latest
|
||||||
name: gnupg2
|
|
||||||
state: latest
|
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
- name: Install gnupg (Arch)
|
- name: Install gnupg (Arch)
|
||||||
package:
|
pacman:
|
||||||
name: gnupg
|
name: gnupg
|
||||||
state: latest
|
state: latest
|
||||||
when: ansible_os_family == "Archlinux"
|
when: ansible_os_family == "Archlinux"
|
||||||
|
|
||||||
- name: Configure gpg.conf (behaviour of gpg)
|
- name: Configure gpg.conf (behaviour of gpg)
|
||||||
template:
|
template: src=gpg.conf.j2 ~/.gnupg/gpg.conf
|
||||||
src: gpg.conf.j2
|
|
||||||
dest: "{{ gpg_folder }}/gpg.conf"
|
|
||||||
|
|
||||||
- name: Configure gpg-agent.conf (agent configuration)
|
- name: Configure gpg-agent.conf (agent configuration)
|
||||||
template:
|
template: src=gpg-agent.conf.j2 ~/.gnupg/gpg-agent.conf
|
||||||
src: gpg-agent.conf.j2
|
|
||||||
dest: "{{ gpg_folder }}/gpg-agent.conf"
|
|
||||||
|
|
||||||
- name: Configure ssh-control (in order for gpg-agent to act as ssh-agent)
|
- name: Configure ssh-control (in order for gpg-agent to act as ssh-agent)
|
||||||
template:
|
template: src=sshcontrol.j2 ~/.gnupg/sshcontrol
|
||||||
src: sshcontrol.j2
|
|
||||||
dest: "{{ gpg_folder }}/sshcontrol"
|
|
||||||
|
|
||||||
- name: Copy gnupg_agent script, which makes gpg-agent responsible for ssh-auth
|
- name: Copy gnupg_agent script, which makes gpg-agent responsible for ssh-auth
|
||||||
template:
|
copy:
|
||||||
src: gnupg_agent.j2
|
src: "{{ role_path }}/files/gpg_agent"
|
||||||
dest: "{{ gpg_folder }}/gnupg_agent"
|
dest: ~/.gnupg/gpg_agent
|
||||||
mode: 0700
|
mode: 0700
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
rc=$(pgrep gpg-agent)
|
|
||||||
if [ "$rc" != 0 ]; then
|
|
||||||
export GPG_AGENT_INFO
|
|
||||||
export SSH_AUTH_SOCK
|
|
||||||
export SSH_AGENT_PID
|
|
||||||
else
|
|
||||||
eval $(gpg-agent --daemon)
|
|
||||||
fi
|
|
||||||
|
|
||||||
gpg-connect-agent /bye
|
|
||||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
||||||
|
|
@ -10,5 +10,5 @@
|
|||||||
# flags. Prepend the keygrip with an '!' mark to disable it.
|
# flags. Prepend the keygrip with an '!' mark to disable it.
|
||||||
|
|
||||||
{% for keygrip in gpg_keygrips %}
|
{% for keygrip in gpg_keygrips %}
|
||||||
{{ keygrip }}
|
{{ gpg_keygrips.keygrip }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Install redshift
|
|
||||||
package:
|
|
||||||
name: redshift
|
|
||||||
state: present
|
|
||||||
|
|
||||||
|
|
||||||
- name: Ensure .config folder for redshift exists
|
|
||||||
file:
|
|
||||||
path: ~/.config/redshift
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: Template redshift config
|
|
||||||
template:
|
|
||||||
src: redshift.conf.j2
|
|
||||||
dest: ~/.config/redshift/redshift.conf
|
|
||||||
|
|
||||||
- name: Template redshift autostart file
|
|
||||||
template:
|
|
||||||
src: redshift-gtk.desktop.j2
|
|
||||||
dest: ~/.config/autostart/redshift-gtk.desktop
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Version=1.0
|
|
||||||
Name=Redshift
|
|
||||||
Exec=redshift-gtk
|
|
||||||
Icon=redshift
|
|
||||||
Terminal=false
|
|
||||||
Type=Application
|
|
||||||
Categories=Utility;
|
|
||||||
StartupNotify=true
|
|
||||||
Hidden=false
|
|
||||||
X-GNOME-Autostart-enabled=true
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user