changed_when: false
check_mode: no
- name: check existing secret key
+ tags: ["no_bootstrap"]
shell: "gpg --list-secret-keys | grep '{{ gpg_useremail }}'"
changed_when: false
ignore_errors: true
register: gpgkeys
check_mode: no
- name: Ask for gpg password
- when: gpgkeys.stdout == ""
+ when: gpgkeys is defined and gpgkeys.stdout == ""
block:
- name: Ask for gpg password
pause:
assert:
that: gpg_password_confirm.user_input == gpg_password.user_input
- name: Generate gpg key
- when: gpgkeys.stdout == ""
+ when: gpgkeys is defined and gpgkeys.stdout == ""
block:
- name: Copy default template for gpg key generation
template:
- name: get keygrip
shell: "gpg -K --with-colons {{ gpg_useremail }} | grep '^grp' | cut -d':' -f10"
register: keygrip
- when: gpgkeys.stdout == ""
+ when: gpgkeys is defined and gpgkeys.stdout == ""
notify:
- notify add key to immae@immae.eu
- send key to immae@immae.eu
when: pam_environment.changed
- name: Add new lines in bashrc_temp
lineinfile:
- line: "{{ ('export ' ~ item) if item != '' and item.0 != '#' else '' }}"
+ line: "{{ ('export ' ~ item) | regex_replace('@{HOME}', '${HOME}') if item != '' and item.0 != '#' else '' }}"
dest: $XDG_STATE_HOME/bash/bashrc_temp
insertafter: EOF
create: true
name: monitor_home.service
enabled: true
- name: Clone password store
+ tags: ["no_bootstrap"]
git:
dest: "$XDG_DATA_HOME/pass"
repo: gitolite@git.immae.eu:perso/Immae/Prive/Password_store