検索

1.5. Overriding Ansible Variables in Satellite

download PDF

If you run Ansible roles in Satellite, you can use Satellite to override Ansible variables for those roles.

Precedence in Overriding Variables

If you use an Ansible role to run a task as a user that is not the Effective User, there is a strict order of precedence for overriding Ansible variables. To ensure that the variable that you override follows the correct order of precedence, see Variable precedence: Where should I put a variable? in the Ansible User Guide.

Prerequisite

You must have Ansible variables in Satellite.

To import Ansible variables, see 「Importing Ansible Variables」

To create Ansible variables, see 「Creating Ansible Variables」

The following procedure makes reference to hosts and host groups. For more information about hosts and host groups, see the Managing Hosts guide.

Procedure

To override an Ansible variable, complete the following steps:

  1. In the Satellite web UI, navigate to Configure > Variables.
  2. Select the Ansible variable that you want to override and manage with Satellite.
  3. Navigate to the Default Behavior area, and select the Override check box.
  4. From the Parameter Type select the value type for validation. For example, a string or boolean variable.
  5. In the Default Value field, enter the default value that you want to use if there is no match for the variable.
  6. Optional: If you do not want to display the Ansible variable in plain text, select the Hidden Values check box to display the content of the variable as asterisks in the Satellite web UI.
  7. To save the override settings, click Submit.

To use the Ansible variable, add the variable as a parameter to your host or host group, or add the variable as a global parameter.

For a Host Group:

  1. In the Satellite web UI, navigate to Configure > Host Groups, and select the host group that you want to use.
  2. Click the Parameters tab, and in the Host Group Parameters area, click Add Parameter.
  3. In the Name field, add the Ansible variable name.
  4. From the Type list, select the type of the variable for validation.
  5. In the Value field, enter the value for the variable.

For a Host:

  1. In the Satellite web UI, navigate to Hosts > All Hosts, and on the host that you want to use, click the Edit button.
  2. Click the Parameters tab, and in the Host Parameters area, click Add Parameter.
  3. In the Name field, add the Ansible variable name.
  4. From the Type list, select the type of the variable for validation.
  5. In the Value field, enter the value for the variable.

To add as a Global Parameter:

  1. In the Satellite web UI, navigate to Configure > Global Parameters, and click Create Parameter.
  2. In the Name field, add the Ansible variable name.
  3. From the Type list, select the type of the variable for validation.
  4. In the Value field, enter the value for the variable.
  5. Optional: If you do not want to display the Ansible variable in plain text, select the Hidden Values check box to display the content of the variable as asterisks in the Satellite web UI.
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.