{# SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. SPDX-License-Identifier: AGPL-3.0-or-later #} {% if grains['nodename'] != 'dom0' -%} include: - dev.home-cleanup - dotfiles.copy-x11 - dotfiles.copy-sh "{{ slsdotpath }}-gnupg-home": file.directory: - name: /home/user/.gnupg/bitcoin - user: user - group: user - mode: '0700' - makedirs: True "{{ slsdotpath }}-save-keys": file.recurse: - require: - file: "{{ slsdotpath }}-gnupg-home" - name: /home/user/.gnupg/bitcoin/download/ - source: salt://{{ slsdotpath }}/files/server/keys/ - user: user - group: user - file_mode: '0600' - dir_mode: '0700' - makedirs: True "{{ slsdotpath }}-import-keys": cmd.run: - require: - file: "{{ slsdotpath }}-save-keys" - name: gpg --status-fd=2 --homedir . --import download/*.asc - cwd: /home/user/.gnupg/bitcoin - runas: user - success_stderr: IMPORT_OK "{{ slsdotpath }}-import-ownertrust": cmd.run: - require: - cmd: "{{ slsdotpath }}-import-keys" - name: gpg --homedir . --import-ownertrust download/otrust.txt - cwd: /home/user/.gnupg/bitcoin - runas: user {% endif -%}