Salt - caching proxy - use pillar to store identity

This commit is contained in:
unman 2023-02-21 12:54:22 +00:00
parent a959efbaec
commit 78c54bd3e1
No known key found for this signature in database
GPG Key ID: FDD1B8244731B36C
5 changed files with 33 additions and 1 deletions

View File

@ -1,5 +1,5 @@
Name: 3isec-qubes-cacher
Version: 1.9
Version: 1.10
Release: 1%{?dist}
Summary: A caching proxy in Qubes
@ -55,6 +55,8 @@ non-template qubes and qubes that do not have a working qrexec. Use
the native configuration to set the update proxy using the IP address
of cacher.
A pillar is created to hold the caching qube.
This can be referenced from other salt states as needed.
%install
rm -rf %{buildroot}
@ -90,6 +92,8 @@ if [ $1 -eq 0 ]; then
fi
%changelog
* Mon Feb 20 2023 unman <unman@thirdeyesecurity.org> - 1.10
- Create pillar for cacher
* Sun Jan 29 2023 unman <unman@thirdeyesecurity.org> - 1.9
- Change packaging so that upgrade will update mirror lists and config
- Update fedora mirror list

View File

@ -1,5 +1,6 @@
include:
- cacher.clone
- cacher.pillar
qvm-present-id:
qvm.present:

21
cacher/pillar.sls Normal file
View File

@ -0,0 +1,21 @@
# Create pillar for proxy
/srv/pillar/update_proxy/init.sls:
file.managed:
- makedirs: True
- source: salt://cacher/pillar_init.sls
- user: root
- group: root
- mode: 644
/srv/pillar/update_proxy/init.top:
file.managed:
- makedirs: True
- source: salt://cacher/pillar_init.top
- user: root
- group: root
- mode: 644
/srv/pillar/_tops/base/update_proxy.top:
file.symlink:
- target: /srv/pillar/update_proxy/init.top

3
cacher/pillar_init.sls Normal file
View File

@ -0,0 +1,3 @@
update_proxy:
caching: cacher

3
cacher/pillar_init.top Normal file
View File

@ -0,0 +1,3 @@
base:
'*':
- update_proxy