-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
* Set user for running Salt Master service due to 3006 changes https://docs.saltproject.io/en/3006/topics/releases/3006.0.html#linux-packaging-salt-master-salt-user-and-group Salt API * Add netapi_enable_clients explicitly due to 3006 changes https://docs.saltproject.io/en/master/topics/netapi/netapi-enable-clients.html#select-client-interfaces-to-enable * Add api_interfaces parameter to enable configuration of API accessibility. However, smart_proxy_salt utilizes only the "runner" API interface.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,15 @@ | |
:content => /:enabled: https/ | ||
}) | ||
end | ||
|
||
it 'should configure master.d/foreman.conf' do | ||
Check failure on line 22 in spec/classes/foreman_proxy__plugin__salt_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 22 in spec/classes/foreman_proxy__plugin__salt_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 22 in spec/classes/foreman_proxy__plugin__salt_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 22 in spec/classes/foreman_proxy__plugin__salt_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
|
||
should contain_file('/etc/salt/master.d/foreman.conf'). | ||
with_content(%r{autosign_grains_dir: /var/lib/foreman-proxy/salt/grains}). | ||
with_content(%r{autosign_file: /etc/salt/autosign.conf}). | ||
with_content(%r{user: root}). | ||
with_content(%r{netapi_enable_clients:\n - runner}). | ||
with_content(%r{external_auth:\n - pam\n - \'@runner\'}) | ||
end | ||
end | ||
|
||
describe 'with overwritten parameters' do | ||
|
@@ -30,6 +39,7 @@ | |
:api_auth => 'ldap', | ||
:api_username => 'saltapi', | ||
:api_password => 'letmein', | ||
:api_interfaces => ['runner', 'local', 'ssh', 'wheel'], | ||
:saltfile => '/etc/salt/Saltfile', | ||
} end | ||
|
||
|
@@ -45,6 +55,16 @@ | |
with_content(%r{:api_password: letmein}). | ||
with_content(%r{:saltfile: /etc/salt/Saltfile}) | ||
end | ||
|
||
it 'should change master.d/foreman.conf parameters' do | ||
Check failure on line 59 in spec/classes/foreman_proxy__plugin__salt_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 59 in spec/classes/foreman_proxy__plugin__salt_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 59 in spec/classes/foreman_proxy__plugin__salt_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 59 in spec/classes/foreman_proxy__plugin__salt_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
|
||
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{user: root}). | ||
with_content(%r{netapi_enable_clients:\n - runner\n - local\n - ssh\n - wheel}). | ||
with_content(%r{external_auth:\n - ldap\n - \'@runner\'}) | ||
end | ||
end | ||
end | ||
end | ||
|