Примечание
# apt-get install smart-proxy
/etc/smart-proxy/config/settings.d/puppetca_http_api.yml
:
--- # URL of the puppet master itself for API requests. :puppet_url: https://foreman.test.alt:8140 # # SSL certificates used to access the CA API. :puppet_ssl_ca: /etc/puppet/ssl/certs/ca.pem :puppet_ssl_cert: /etc/puppet/ssl/certs/foreman.test.alt.pem :puppet_ssl_key: /etc/puppet/ssl/private_keys/foreman.test.alt.pem
/etc/smart-proxy/config/settings.d/puppet_proxy_puppet_api.yml
:
--- # URL of the puppet master itself for API requests. :puppet_url: https://foreman.test.alt:8140 # # SSL certificates used to access the puppet API :puppet_ssl_ca: /etc/puppet/ssl/certs/ca.pem :puppet_ssl_cert: /etc/puppet/ssl/certs/foreman.test.alt.pem :puppet_ssl_key: /etc/puppet/ssl/private_keys/foreman.test.alt.pem # # Smart Proxy api timeout when Puppet's environment classes api is used and classes cache is disabled :api_timeout: 30
/etc/smart-proxy/config/settings.d/puppetca.yml
:
--- # # PuppetCA management # Can be true, false, or http/https to enable just one of the protocols :enabled: http # valid providers: # - puppetca_hostname_whitelisting (verify CSRs based on a hostname whitelist) # - puppetca_token_whitelisting (verify CSRs based on a token whitelist) :use_provider: puppetca_hostname_whitelisting # Puppet version used :puppet_version: 7.20.0
/etc/smart-proxy/config/settings.d/puppet.yml
:
--- # Can be true, false, or http/https to enable just one of the protocols :enabled: http # valid providers: # puppet_proxy_mcollective (uses mco puppet) # puppet_proxy_ssh (run puppet over ssh) # puppet_proxy_salt (uses salt puppet.run) # puppet_proxy_customrun (calls a custom command with args) #:use_provider: puppet_proxy_customrun # Puppet version used :puppet_version: 7.20.0
/etc/smart-proxy/config/settings.d/puppetca_hostname_whitelisting.yml
:
--- # # Configuration of the PuppetCA hostname_whitelisting provider # :autosignfile: /etc/puppet/autosign.conf
/etc/smart-proxy/config/settings.d/facts.yml
:
--- # Can be true, false, or http/https to enable just one of the protocols :enabled: true
/etc/puppet/autosign.conf
и установленные на него разрешения (rw-rw-r--):
# ls -l /etc/puppet/autosign.conf
Если файла нет, создать и установить на него разрешения:
#touch /etc/puppet/autosign.conf
#chmod 664 /etc/puppet/autosign.conf
/etc/smart-proxy/config/settings.yml
указать следующие параметры:
:trusted_hosts: [foreman.test.alt,localhost] :foreman_url: https://foreman.test.alt:2345 :foreman_ssl_ca: /etc/foreman/rootCA.pem :foreman_ssl_cert: /etc/foreman/ssl_cert.pem :foreman_ssl_key: /etc/foreman/ssl_key.pem
Примечание
foreman_ssl…
в файле /etc/smart-proxy/config/settings.yml
могут быть такие:
:foreman_ssl_ca: /etc/puppet/ssl/certs/ca.pem :foreman_ssl_cert: /etc/foreman/ssl_cert.pem :foreman_ssl_key: /etc/foreman/ssl_key.pem
# systemctl enable --now smart-proxy
http://localhost:8000
. Проверка (должен быть установлен пакет telnet):
# telnet localhost 8000
https://foreman.test.alt:2345/smart_proxies/new
):
# systemctl restart smart-proxy