Update Salt Master configuration template #1578
Annotations
4 errors
|
Run tests:
spec/classes/foreman_proxy__plugin__salt_spec.rb#L59
foreman_proxy::plugin::salt on debian-11-x86_64 with overwritten parameters should change master.d/foreman.conf parameters
Failure/Error:
should contain_file('/etc/salt/master.d/foreman.conf').
with_content(%r{user: example}).
with_content(%r{autosign_grains_dir: /var/lib/foreman-proxy/salt/grains}).
with_content(%r{autosign_file: /etc/salt/example.conf}).
with_content(%r{netapi_enable_clients:\n - runner\n - local\n - ssh\n - wheel}).
with_content(%r{external_auth:\n ldap:\n saltuser:\n - '@runner'})
expected that the catalogue would contain File[/etc/salt/master.d/foreman.conf] with content set to /external_auth:\n ldap:\n saltuser:\n - '@runner'/ but it is set to "# /etc/salt/master.d/foreman.config Master configuration\n#\n# This file summarizes configurations for the salt-master.\n# Have a look at the [Foreman Salt Plugin Documentation](https://theforeman.org/plugins/foreman_salt/) for detailed explanations.\n#\n# After editing this file, run the following command to active the changes:\n# systemctl restart salt-master\n\n\n##\n# Autosign\nautosign_grains_dir: /var/lib/foreman-proxy/salt/grains\nautosign_file: /etc/salt/example.conf\n# Uncomment the next line to make use of the autosign host name file (not recommended)\n# permissive_pki_access: True\n\n\n##\n# Salt Master service user\nuser: example\n\n\n##\n# Node classifier\nmaster_tops:\n ext_nodes: /usr/bin/foreman-node\n\n\n##\n# Pillar data access\next_pillar:\n - puppet: /usr/bin/foreman-node\n\n\n##\n# Salt API access\nexternal_auth:\n ldap:\n saltapi:\n - '@runner'\n\nrest_cherrypy:\n port: 9191\n ssl_key: /etc/puppetlabs/puppet/ssl/private_keys/foo.example.com.pem\n ssl_crt: /etc/puppetlabs/puppet/ssl/certs/foo.example.com.pem\n\nnetapi_enable_clients:\n - runner\n - local\n - ssh\n - wheel\n\n\n##\n# Remote execution provider\npublisher_acl:\n foreman-proxy:\n - state.template_str\n\n\n##\n# Reactors\nreactor:\n - 'salt/auth': # Autosign reactor\n - /usr/share/foreman-proxy/salt/reactors/foreman_minion_auth.sls\n - 'salt/job/*/ret/*': # Report reactor\n - /usr/share/foreman-proxy/salt/reactors/foreman_report_upload.sls\n"
Diff:
@@ -1,67 +1,133 @@
-(?-mix:external_auth:\n ldap:\n saltuser:\n - '@runner')
+# /etc/salt/master.d/foreman.config Master configuration
+#
+# This file summarizes configurations for the salt-master.
+# Have a look at the [Foreman Salt Plugin Documentation](https://theforeman.org/plugins/foreman_salt/) for detailed explanations.
+#
+# After editing this file, run the following command to active the changes:
+# systemctl restart salt-master
+
+
+##
+# Autosign
+autosign_grains_dir: /var/lib/foreman-proxy/salt/grains
+autosign_file: /etc/salt/example.conf
+# Uncomment the next line to make use of the autosign host name file (not recommended)
+# permissive_pki_access: True
+
+
+##
+# Salt Master service user
+user: example
+
+
+##
+# Node classifier
+master_tops:
+ ext_nodes: /usr/bin/foreman-node
+
+
+##
+# Pillar data access
+ext_pillar:
+ - puppet: /usr/bin/foreman-node
+
+
+##
+# Salt API access
+external_auth:
+ ldap:
+ saltapi:
+ - '@runner'
+
+rest_cherrypy:
+ port: 9191
+ ssl_key: /etc/puppetlabs/puppet/ssl/private_keys/foo.example.com.pem
+ ssl_crt: /etc/puppetlabs/puppet/ssl/certs/foo.example.com.pem
+
+netapi_enable_clients:
+ - runner
+ - local
+ - ssh
+ - wheel
+
+
+##
+# Remote execution provider
+publisher_acl:
+ foreman-proxy:
+ - state.template_str
+
+
+##
+# Reactors
+reactor:
+ - 'salt/auth': # Autosign reactor
+ - /usr/share/foreman-proxy/salt/reactors/foreman_minion_auth.sls
+ - 'salt/job/*/ret/*': # Report reactor
+ - /usr/share/foreman-proxy/salt/reactors/foreman_report_upload.sls
|
Run tests:
spec/classes/foreman_proxy__plugin__salt_spec.rb#L59
foreman_proxy::plugin::salt on redhat-8-x86_64 with overwritten parameters should change master.d/foreman.conf parameters
Failure/Error:
should contain_file('/etc/salt/master.d/foreman.conf').
with_content(%r{user: example}).
with_content(%r{autosign_grains_dir: /var/lib/foreman-proxy/salt/grains}).
with_content(%r{autosign_file: /etc/salt/example.conf}).
with_content(%r{netapi_enable_clients:\n - runner\n - local\n - ssh\n - wheel}).
with_content(%r{external_auth:\n ldap:\n saltuser:\n - '@runner'})
expected that the catalogue would contain File[/etc/salt/master.d/foreman.conf] with content set to /external_auth:\n ldap:\n saltuser:\n - '@runner'/ but it is set to "# /etc/salt/master.d/foreman.config Master configuration\n#\n# This file summarizes configurations for the salt-master.\n# Have a look at the [Foreman Salt Plugin Documentation](https://theforeman.org/plugins/foreman_salt/) for detailed explanations.\n#\n# After editing this file, run the following command to active the changes:\n# systemctl restart salt-master\n\n\n##\n# Autosign\nautosign_grains_dir: /var/lib/foreman-proxy/salt/grains\nautosign_file: /etc/salt/example.conf\n# Uncomment the next line to make use of the autosign host name file (not recommended)\n# permissive_pki_access: True\n\n\n##\n# Salt Master service user\nuser: example\n\n\n##\n# Node classifier\nmaster_tops:\n ext_nodes: /usr/bin/foreman-node\n\n\n##\n# Pillar data access\next_pillar:\n - puppet: /usr/bin/foreman-node\n\n\n##\n# Salt API access\nexternal_auth:\n ldap:\n saltapi:\n - '@runner'\n\nrest_cherrypy:\n port: 9191\n ssl_key: /etc/puppetlabs/puppet/ssl/private_keys/foo.example.com.pem\n ssl_crt: /etc/puppetlabs/puppet/ssl/certs/foo.example.com.pem\n\nnetapi_enable_clients:\n - runner\n - local\n - ssh\n - wheel\n\n\n##\n# Remote execution provider\npublisher_acl:\n foreman-proxy:\n - state.template_str\n\n\n##\n# Reactors\nreactor:\n - 'salt/auth': # Autosign reactor\n - /usr/share/foreman-proxy/salt/reactors/foreman_minion_auth.sls\n - 'salt/job/*/ret/*': # Report reactor\n - /usr/share/foreman-proxy/salt/reactors/foreman_report_upload.sls\n"
Diff:
@@ -1,67 +1,133 @@
-(?-mix:external_auth:\n ldap:\n saltuser:\n - '@runner')
+# /etc/salt/master.d/foreman.config Master configuration
+#
+# This file summarizes configurations for the salt-master.
+# Have a look at the [Foreman Salt Plugin Documentation](https://theforeman.org/plugins/foreman_salt/) for detailed explanations.
+#
+# After editing this file, run the following command to active the changes:
+# systemctl restart salt-master
+
+
+##
+# Autosign
+autosign_grains_dir: /var/lib/foreman-proxy/salt/grains
+autosign_file: /etc/salt/example.conf
+# Uncomment the next line to make use of the autosign host name file (not recommended)
+# permissive_pki_access: True
+
+
+##
+# Salt Master service user
+user: example
+
+
+##
+# Node classifier
+master_tops:
+ ext_nodes: /usr/bin/foreman-node
+
+
+##
+# Pillar data access
+ext_pillar:
+ - puppet: /usr/bin/foreman-node
+
+
+##
+# Salt API access
+external_auth:
+ ldap:
+ saltapi:
+ - '@runner'
+
+rest_cherrypy:
+ port: 9191
+ ssl_key: /etc/puppetlabs/puppet/ssl/private_keys/foo.example.com.pem
+ ssl_crt: /etc/puppetlabs/puppet/ssl/certs/foo.example.com.pem
+
+netapi_enable_clients:
+ - runner
+ - local
+ - ssh
+ - wheel
+
+
+##
+# Remote execution provider
+publisher_acl:
+ foreman-proxy:
+ - state.template_str
+
+
+##
+# Reactors
+reactor:
+ - 'salt/auth': # Autosign reactor
+ - /usr/share/foreman-proxy/salt/reactors/foreman_minion_auth.sls
+ - 'salt/job/*/ret/*': # Report reactor
+ - /usr/share/foreman-proxy/salt/reactors/foreman_report_upload.sls
|
Run tests
The operation was canceled.
|
Loading