Split GPG - clean up states. Make coherent with General GPG policies

This commit is contained in:
unman 2024-05-09 15:07:55 +00:00
parent b63bfaab58
commit b49a151cf2
No known key found for this signature in database
GPG Key ID: FDD1B8244731B36C

View File

@ -1,13 +1,13 @@
include: include:
- gpg.clone - gpg.clone
qvm-present-id: gpg-present-id:
qvm.present: qvm.present:
- name: sys-gpg - name: sys-gpg
- template: template-gpg - template: template-gpg
- label: gray - label: gray
qvm-prefs-id: gpg-prefs-id:
qvm.prefs: qvm.prefs:
- name: sys-gpg - name: sys-gpg
- netvm: none - netvm: none
@ -15,7 +15,7 @@ qvm-prefs-id:
- maxmem: 800 - maxmem: 800
- vcpus: 2 - vcpus: 2
qvm-features-id: gpg-features-id:
qvm.features: qvm.features:
- name: sys-gpg - name: sys-gpg
- disable: - disable:
@ -25,7 +25,17 @@ qvm-features-id:
'qvm-volume extend sys-gpg:private 10G' : 'qvm-volume extend sys-gpg:private 10G' :
cmd.run cmd.run
update_file: check_gpg_policy_file:
file.prepend: file.managed:
- name: '/etc/qubes/policy.d/30-user.policy' - name: /etc/qubes/policy.d/50-config-splitgpg.policy
- text: 'qubes.Gpg * @anyvm @anyvm ask default_target=sys-gpg'
update_gpg_policy_file:
file.replace:
- name: /etc/qubes/policy.d/50-config-splitgpg.policy
- pattern: |
# Any changes made manually may be overwritten by Qubes Configuration Tools.
- repl: |
# Any changes made manually may be overwritten by Qubes Configuration Tools.
qubes.Gpg * @anyvm sys-gpg ask
- count: 1
- prepend_if_not_found: True