sean797.foreman_installer
foreman_installer 
Rola do interakcji z foreman-installer
Wymagania
Brak.
Zmienne roli
vars:
foreman_installer:
foreman_installer_pkg: # Pakiet instalatora foreman. Prawdopodobnie chcesz użyć "foreman-installer" lub "katello".
foreman_installer_verbose: # Uruchom instalator z opcją -v
foreman_installer_scenario: # Scenariusz. Wymagane
foreman_installer_scenarios_answers: # Słownik własnych odpowiedzi dla twojego scenariusza. Zobacz [FAQs](https://github.com/sean797/ansible-role-foreman_installer#faqs).
foreman_installer_options: [] # Tablica dodatkowych opcji do przekazania podczas uruchamiania instalatora
foreman_installer_generate_proxy_certs_from: # Ciąg zawierający hosta ansible do generowania certyfikatów dla Katello Smart Proxy
foreman_installer_katello_ca: # Ciąg zawierający niestandardowy certyfikat CA. Tylko dla Katello i Katello Smart Proxy.
foreman_installer_katello_cert: # Ciąg zawierający niestandardowy certyfikat. Tylko dla Katello.
foreman_installer_katello_key: # Ciąg zawierający niestandardowy klucz. Tylko dla Katello.
foreman_installer_katello_csr: # Ciąg zawierający niestandardowy CSR. Tylko dla Katello.
foreman_installer_katello_proxy_cert: # Ciąg zawierający niestandardowy certyfikat. Tylko dla Katello Smart Proxy.
foreman_installer_katello_proxy_key: # Ciąg zawierający niestandardowy klucz. Tylko dla Katello Smart Proxy.
foreman_installer_katello_proxy_csr: # Ciąg zawierający niestandardowy CSR. Tylko dla Katello Smart Proxy.
foreman_installer_katello_certs_dir: # Katalog do przechowywania certyfikatów
foreman_installer_update_certs: False # Ustaw na True, aby wymusić aktualizację certyfikatów.
foreman_installer_update_certs_tar: False # Ustaw na True, aby wymusić wygenerowanie i zastosowanie nowego archiwum certyfikatów Proxy.
# Opcje zaawansowane
foreman_installer_patches: # Tablica słowników umożliwiająca łatanie plików instalatora. Zobacz plik defaults/main.yml dla przykładu.
foreman_installer_encryption_key: # Klucz szyfrowania, który jest umieszczany w /etc/foreman/encryption_key.rb. Musi być taki sam w całym klastrze Foreman.
foreman_installer_katello_cluster_group: # Nazwa grupy zasobów, która zawiera wszystkie serwery Katello. Wymaga http://projects.theforeman.org/issues/20021
Przykładowy playbook
Podstawowy scenariusz Foreman:
- hosts:
- foreman.example.com
roles:
- role: foreman_installer
foreman_installer_scenario: foreman
foreman_installer_scenarios_answers:
foreman:
admin_password: changeme
Scenariusz Katello z niestandardowymi certyfikatami:
- hosts:
- katello.example.com
var_files:
- group_vars/vault_certs.yml
roles:
- role: foreman_installer
foreman_installer_pkg: katello
foreman_installer_scenario: katello
foreman_installer_scenarios_answers:
foreman:
admin_password: changeme
foreman_installer_katello_ca: "{{ vault_foreman_installer_katello_ca }}"
foreman_installer_katello_cert: "{{ vault_katello_cert }}"
foreman_installer_katello_key: "{{ vault_foreman_installer_katello_key }}"
foreman_installer_katello_csr: "{{ vault_foreman_installer_katello_csr }}"
Scenariusz Proxy Katello z dostarczonym archiwum certyfikatów:
- hosts:
- foreman-proxy.example.com
roles:
- role: foreman_installer
foreman_installer_pkg: foreman-proxy-content
foreman_installer_scenario: foreman-proxy-content
foreman_installer_scenarios_answers:
foreman_proxy_content:
certs_tar: /root/foreman-proxy.example.com-certs.tar # To musi już być na dysku
pulp_oauth_secret: <zwrócony podczas generowania archiwum certyfikatów>
parent_fqdn: katello.example.com
foreman_proxy:
oauth_consumer_key: <zwrócony podczas generowania archiwum certyfikatów>
oauth_consumer_secret: <zwrócony podczas generowania archiwum certyfikatów>
foreman_base_url: https://katello.example.com
trusted_hosts:
- katello.example.com
- "{{ ansible_fqdn }}"
Scenariusz Proxy Katello bez dostarczonego archiwum certyfikatów:
- hosts:
- foreman-proxy.example.com
roles:
- role: foreman_installer
foreman_installer_pkg: foreman-proxy-content
foreman_installer_scenario: foreman-proxy-content
foreman_installer_generate_proxy_certs_from: katello.example.com
foreman_installer_katello_proxy_cert: "{{ vault_proxy1_cert }}"
foreman_installer_katello_proxy_key: "{{ vault_proxy1_key }}"
foreman_installer_katello_proxy_csr: "{{ vault_proxy1_csr }}"
foreman_installer_katello_ca: "{{ vault_foreman_installer_katello_ca }}"
foreman_installer_scenarios_answers:
foreman_proxy_content:
parent_fqdn: katello.example.com
foreman_proxy:
foreman_base_url: https://katello.example.com
trusted_hosts:
- katello.example.com
Klastrowy scenariusz Katello z niestandardowymi certyfikatami:
Kilka rzeczy do zapamiętania:
- Wszystkie klucze, sekrety i hasła muszą być takie same w całym klastrze. Proszę nie używać wartości z tego przykładu.
- Opcja
foreman_installer_patches
została użyta tylko do wprowadzenia poprawek do mojego wydania Katello.
- hosts:
- katello1.example.com
- katello2.example.com
var_files:
- group_vars/vault_certs.yml
roles:
- role: foreman_installer
foreman_installer_pkg: katello
foreman_installer_scenario: katello
foreman_installer_scenarios_answers:
foreman_proxy_content:
pulp_oauth_secret: uC2qfoQfPVhdFTBEbS89ykZWQz6BVpcu
foreman:
db_password: KmVzXiWuVWCUZrn4kWF8PRsFG4H4ecqo
initial_location: Global
initial_organization: AMCE
admin_password: changeme
servername: katello.example.com
foreman_url: https://katello.example.com
oauth_consumer_key: xmi95B9qNQoX6owdg4MT8WMCBNhgudYy
oauth_consumer_secret: x6TheD8Z9ZBtgdgBUrqSbPR2rh6k7UQE
foreman_proxy:
registered_name: katello.example.com
registered_proxy_url: https://katello.example.com:9090
oauth_consumer_key: xmi95B9qNQoX6owdg4MT8WMCBNhgudYy
oauth_consumer_secret: x6TheD8Z9ZBtgdgBUrqSbPR2rh6k7UQE
foreman_base_url: https://katello.example.com
trusted_hosts:
- katello.example.com
- katello1.example.com
- katello2.example.com
katello:
oauth_secret: uC2qfoQfPVhdFTBEbS89ykZWQz6BVpcu
foreman_installer_custom_hiera:
candlepin::db_password: L45DkebcvWdgXG9ryzWkfavSvQ23dw8U
foreman_installer_encryption_key: dfc6799e4d722a4e86c786cb0fc96cbbae0151f6
foreman_installer_katello_cluster_group: katello-servers
foreman_installer_katello_ca: "{{ vault_foreman_installer_katello_ca }}"
foreman_installer_katello_cert: "{{ vault_katello_cert }}" # Certyfikat musi używać dns-alt-names z wszystkimi nazwami hostów klastra i nazwą VIP.
foreman_installer_katello_key: "{{ vault_foreman_installer_katello_key }}"
foreman_installer_katello_csr: "{{ vault_foreman_installer_katello_csr }}"
foreman_installer_patches:
- { src: files/katello_certs_tools.patch, basedir: /usr/lib/python2.7/site-packages/ }
- { src: files/puppet-certs.patch, basedir: /usr/share/katello-installer-base/modules/certs/ }
Klastrowy proxy Foreman połączony z klastrem Katello z niestandardowymi certyfikatami:
Każdy proxy jest osobnym proxy w Foreman, ale klient może użyć adresu VIP do połączenia się z którymkolwiek z nich w celu pobrania pakietów.
- hosts:
- foreman-proxy1.example.com
- foreman-proxy2.example.com
roles:
- role: foreman_installer
foreman_installer_pkg: foreman-proxy-content
foreman_installer_scenario: foreman-proxy-content
foreman_installer_generate_proxy_certs_from: katello1.example.com
foreman_installer_katello_proxy_cert: "{{ vault_proxy1_cert }}" # Certyfikat musi używać dns-alt-names z wszystkimi nazwami hostów klastra i nazwą VIP.
foreman_installer_katello_proxy_key: "{{ vault_proxy1_key }}"
foreman_installer_katello_proxy_csr: "{{ vault_proxy1_csr }}"
foreman_installer_katello_ca: "{{ vault_foreman_installer_katello_ca }}"
foreman_installer_scenarios_answers:
foreman_proxy_content:
parent_fqdn: katello.example.com
foreman_proxy:
foreman_base_url: https://katello.example.com
trusted_hosts:
- katello1.example.com
- katello2.example.com
- katello.example.com
- foreman-proxy1.example.com
- foreman-proxy2.example.com
- foreman-proxy.example.com
FAQ
Jak dowiedzieć się, jakie opcje umieścić w zmiennej foreman_installer_scenarios_answers
?
Musisz sprawdzić plik /etc/foreman-installer/scenarios.d/{{ foreman_installer_scenario }}-answers.yaml. Przechowywanie odpowiedzi w ten sposób czyni rolę idempotentną. Jeśli użyjesz foreman_installer_options
, instaluje to przy każdym uruchomieniu, aby upewnić się, że jest zastosowane. Ta metoda pozwala nam zarządzać plikiem odpowiedzi i uruchamiać instalator jako handler (tylko jeśli coś się zmienia).
Jak usunąć opcje z zmiennej foreman_installer_scenarios_answers
?
Musisz ustawić wartość na null
.
foreman_installer_scenarios_answers:
foreman:
admin_password: changeme
admin_last_name: null
Jak włączyć lub wyłączyć wtyczkę?
Aby włączyć, ustaw wartość na pusty hash. Aby wyłączyć, ustaw wartość na false.
foreman_installer_scenarios_answers:
foreman:
admin_password: changeme
admin_last_name: null
"foreman::plugin::remote_execution": {}
"foreman::plugin::discovery": false
O projekcie
Interacts with foreman-installer/satellite-installer to build Foreman, Katello, Satllite 6, Capsules or Smart Proxies.
Zainstaluj
ansible-galaxy install sean797.foreman_installer
Licencja
gpl-3.0
Pobrania
1.2k
Właściciel