Skip to content
Snippets Groups Projects
Verified Commit 6bd891f5 authored by Giancarlo Razzolini's avatar Giancarlo Razzolini
Browse files

roles/archweb: Create a pgp_import service and a pacman hook to run when...

roles/archweb: Create a pgp_import service and a pacman hook to run when archlinux-keyring is updated
parent 29017a1b
No related branches found
No related tags found
No related merge requests found
......@@ -3,5 +3,7 @@ archweb_dir: '/srv/http/archweb'
archweb_domain: 'www.archlinux.org'
archweb_site: true
archweb_mirrorcheck: false
archweb_pgp_import: false
archweb_keyring: '/etc/pacman.d/gnupg/pubring.gpg'
archweb_reporead: false
archweb_services: false
\ No newline at end of file
archweb_services: false
......@@ -59,6 +59,20 @@
- daemon reload
when: archweb_services or archweb_mirrorcheck
- name: install pgp_import service
template: src="archweb-pgp_import.service.j2" dest="/etc/systemd/system/archweb-pgp_import.service" owner=root group=root mode=0644
notify:
- daemon reload
when: archweb_services or archweb_pgp_import
- name: create pacman.d hooks dir
file: state=directory owner=root group=root path="/etc/pacman.d/hooks"
when: archweb_services or archweb_pgp_import
- name: install pgp_import hook
template: src="archweb-pgp_import-pacman-hook.j2" dest="/etc/pacman.d/hooks/archweb-pgp_import.hook" owner=root group=root mode=0644
when: archweb_services or archweb_pgp_import
- name: install archweb memcached service
template: src="archweb-memcached.service.j2" dest="/etc/systemd/system/archweb-memcached.service" owner=root group=root mode=0644
notify:
......
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = archlinux-keyring
[Action]
When = PostTransaction
Exec = /usr/bin/systemctl start archweb-pgp_import
[Unit]
Description=archewb pgp_import
[Service]
Type=oneshot
User=archweb
WorkingDirectory={{ archweb_dir }}
ExecStart={{ archweb_dir }}/env/bin/python manage.py pgp_import {{ archweb_keyring }}
[Install]
WantedBy=multi-user.target
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment