mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 02:24:09 +00:00
install parcimonie
Hooking into tor's nmtrust config seems to make sense. I don't know if someone would want to run tor and not this, and you can't run this and not tor. This does introduce a new requirement for nmtrust that we haven't seen before: tor must be started before parcimonie for it to work. Given the order of the tasks, spark will cause parcimonie to be added to the trusted unit file after tor, which means we should be good here. But if a user were to manually edit the file, placing parcimonie above tor, it would not work. I'm not sure I really want to deal with that problem. We're running parcimonie for the primary user rather than using the special `all-users.conf` that parcimonie ships with. That would cause parcimonie to run for all users who have a ~~/.gnupg`, which in our case includes root. Running this as root seems like a Bad Idea.
This commit is contained in:
parent
81898d6f02
commit
2507edc493
4 changed files with 33 additions and 0 deletions
|
|
@ -56,6 +56,7 @@
|
|||
- { role: calibre, tags: ['calibre'] }
|
||||
- { role: cli53, tags: ['cli53'] }
|
||||
- { role: tor, tags: ['tor'] }
|
||||
- { role: parcimonie, tags: ['parcimonie'] }
|
||||
vars_prompt:
|
||||
- name: user_password
|
||||
prompt: "Enter desired user password"
|
||||
|
|
|
|||
3
roles/parcimonie/meta/main.yml
Normal file
3
roles/parcimonie/meta/main.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- { role: tor }
|
||||
28
roles/parcimonie/tasks/main.yml
Normal file
28
roles/parcimonie/tasks/main.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- name: Install parcimonie.sh
|
||||
aur: name=parcimonie-sh-git user={{ user.name }}
|
||||
tags:
|
||||
- aur
|
||||
|
||||
- name: Push parcimonie.sh user configuration
|
||||
template: src=user.conf.j2 dest=/etc/parcimonie.sh.d/{{ user.name }}.conf
|
||||
|
||||
- name: Enable and start parcimione.sh
|
||||
service: name="parcimonie.sh@{{ user.name }}.service" enabled=yes state=started
|
||||
when: tor is defined and tor.run_on == "all"
|
||||
|
||||
- name: Remove parcimione.sh from trusted unit list
|
||||
lineinfile: dest=/usr/local/etc/trusted_units
|
||||
state=absent
|
||||
line="parcimonie.sh@{{ user.name }}.service"
|
||||
when: tor is defined and tor.run_on == "all"
|
||||
|
||||
- name: Disable parcimione.sh
|
||||
service: name="parcimonie.sh@{{ user.name }}.service" enabled=no
|
||||
when: tor is defined and tor.run_on == "trusted"
|
||||
|
||||
- name: Add parcimione.sh to trusted unit list
|
||||
lineinfile: dest=/usr/local/etc/trusted_units
|
||||
state=present
|
||||
line="parcimonie.sh@{{ user.name }}.service"
|
||||
when: tor is defined and tor.run_on == "trusted"
|
||||
1
roles/parcimonie/templates/user.conf.j2
Normal file
1
roles/parcimonie/templates/user.conf.j2
Normal file
|
|
@ -0,0 +1 @@
|
|||
PARCIMONIE_USER="{{ user.name }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue