-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #37835 - Add user and netapi to Salt config
* 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
1 parent
32de4bd
commit 6ec9558
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
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 saltuser:\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,15 @@ | |
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{netapi_enable_clients:\n - runner\n - local\n - ssh\n - wheel}). | ||
with_content(%r{external_auth:\n ldap:\n saltuser:\n - '@runner'}) | ||
end | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters