sean797.foreman_installer
foreman_installer 
foreman-installerと対話するための役割
要件
該当なし
役割の変数
vars:
foreman_installer:
foreman_installer_pkg: # foremanインストーラーのパッケージ。「foreman-installer」または「katello」を使用したいでしょう。
foreman_installer_verbose: # -vオプションでインストールを実行
foreman_installer_scenario: # シナリオ。必須
foreman_installer_scenarios_answers: # シナリオに合わせたカスタム回答の辞書。 [FAQを参照](https://github.com/sean797/ansible-role-foreman_installer#faqs)。
foreman_installer_options: [] # インストーラーを実行する際に渡す追加オプションの配列
foreman_installer_generate_proxy_certs_from: # Katello Smart Proxy用の証明書を生成するためのansibleホストを含む文字列
foreman_installer_katello_ca: # カスタムCA証明書を含む文字列。KatelloおよびKatello Smart Proxy専用。
foreman_installer_katello_cert: # カスタム証明書を含む文字列。Katello専用。
foreman_installer_katello_key: # カスタムキーを含む文字列。Katello専用。
foreman_installer_katello_csr: # カスタムCSRを含む文字列。Katello専用。
foreman_installer_katello_proxy_cert: # カスタム証明書を含む文字列。Katello Smart Proxy専用。
foreman_installer_katello_proxy_key: # カスタムキーを含む文字列。Katello Smart Proxy専用。
foreman_installer_katello_proxy_csr: # カスタムCSRを含む文字列。Katello Smart Proxy専用。
foreman_installer_katello_certs_dir: # 証明書を保存するディレクトリ
foreman_installer_update_certs: False # 証明書の更新を強制するためにTrueに設定
foreman_installer_update_certs_tar: False # 新しいプロキシ証明書tarを生成・適用するためにTrueに設定
# 高度なオプション
foreman_installer_patches: # インストーラーファイルに対してのパッチを許可する辞書の配列。例はdefaults/main.ymlを参照。
foreman_installer_encryption_key: # /etc/foreman/encryption_key.rbに格納される暗号化キー。Foremanクラスター全体で同じである必要があります。
foreman_installer_katello_cluster_group: # すべてのKatelloサーバーを持つインベントリグループの名前。http://projects.theforeman.org/issues/20021が必要です。
例プレイブック
基本的なForemanシナリオ:
- hosts:
- foreman.example.com
roles:
- role: foreman_installer
foreman_installer_scenario: foreman
foreman_installer_scenarios_answers:
foreman:
admin_password: changeme
カスタム証明書を使用したKatelloシナリオ:
- 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 }}"
提供された証明書tarを使用したKatello Proxyシナリオ:
- 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 # これはすでにディスク上に存在しなければなりません
pulp_oauth_secret: <証明書tar生成時に出力される>
parent_fqdn: katello.example.com
foreman_proxy:
oauth_consumer_key: <証明書tar生成時に出力される>
oauth_consumer_secret: <証明書tar生成時に出力される>
foreman_base_url: https://katello.example.com
trusted_hosts:
- katello.example.com
- "{{ ansible_fqdn }}"
提供された証明書tarなしのKatello Proxyシナリオ:
- 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
カスタム証明書を使用したKatelloクラスター:
注意すべき点:
- すべてのキー、シークレット、およびパスワードの回答が必要です。これらはクラスター全体で同じでなければなりません。この例の値を使用しないでください。
foreman_installer_patches
オプションは、http://projects.theforeman.org/issues/20021を私の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 }}" # 証明書はすべてのクラスターのホスト名とVIPホスト名のdns-alt-namesを使用している必要があります。
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/ }
カスタム証明書を使用してKatelloクラスターに接続したForemanプロキシのクラスター:
各プロキシはForeman内で独自のプロキシですが、クライアントはVIPアドレスを使用して両方のプロキシに接続できます。
- 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 }}" # 証明書はすべてのクラスターのホスト名とVIPホスト名のdns-alt-namesを使用している必要があります。
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
foreman_installer_scenarios_answers
に何を入れればいいのかわかりません。
/etc/foreman-installer/scenarios.d/{{ foreman_installer_scenario }}-answers.yaml
ファイルを確認する必要があります。このように回答を保存することで、役割の冪等性が保たれます。代わりにforeman_installer_options
を使用すると、毎回インストーラーを実行して適用されていることを確認する必要がありました。一方、この方法では回答ファイルを管理し、インストーラーをハンドラとして(何かが変更された場合のみ)実行できます。
foreman_installer_scenarios_answers
からオプションを削除するにはどうすればよいですか?
値をnull
に設定する必要があります。
foreman_installer_scenarios_answers:
foreman:
admin_password: changeme
admin_last_name: null
プラグインを有効または無効にするにはどうすればよいですか?
有効にするには、値を空のハッシュに設定します。無効にするには、値をfalseに設定します。
foreman_installer_scenarios_answers:
foreman:
admin_password: changeme
admin_last_name: null
"foreman::plugin::remote_execution": {}
"foreman::plugin::discovery": false
プロジェクトについて
Interacts with foreman-installer/satellite-installer to build Foreman, Katello, Satllite 6, Capsules or Smart Proxies.
インストール
ansible-galaxy install sean797.foreman_installer
ライセンス
gpl-3.0
ダウンロード
1.2k
所有者