On 2020-05-17 17:08, unman wrote:
My current goal is to automate the update of a fedora template as soon as a new one is available.
I'm trying to achieve this by these steps:
1. creating a clone of the default template
2. update this template with packages for a special purpose template
Details:
I created a top file like this:
-------- /srv/salt/user_salt/create_my_special_purpose_template.top --------
base:
dom0:
- match: nodegroup
- user_salt.create-template-clone
't-fedora-*-template-clone':
- user_salt.install-pkgs-for-special-purpose-template
-------- /srv/salt/user_salt/create_my_special_purpose_template.top --------
1. creating a clone of the default template is done by this file
-------- /srv/salt/user_salt/create-template-clone.sls --------
create-template-clone:
qvm.clone:
- name: t-fedora-{{ pillar['version'] }}-special-purpose-template
- source: fedora-{{ pillar['version'] }}-minimal
-------- /srv/salt/user_salt/create-template-clone.sls --------
2. update this template with packages for a special purpose template
-------- /srv/salt/user_salt/install-pkgs-for-special-purpose-template.sls --------
install-packages:
pkg.installed:
- pkgs:
- nano
- refresh: True
-------- /srv/salt/user_salt/install-pkgs-for-special-purpose-template.sls --------
In step 2 I'm trying to use pillars to be less dependent from the fedora version.
When I'm running the command:
sudo qubesctl --show-output --target t-fedora-31-template-clone state.highstate pillar='{"version": "31"}'
I get the error:
TypeError encountered executing state.highstate: highstate() takes from 0 to 1 positional arguments but 2 were given
That's why I'm trying to include pillars at least as a file, but don't manage to include them, so that they could by used by step 1.
Thank you very much by reading this long story... :) And if you've suggestion to solve it I even more appreciate it. :))