이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 2. Using Ansible roles to automate repetitive tasks on hosts


Ansible roles provide a way to standardize and automate configuration and maintenance tasks on hosts registered to Satellite. After importing and assigning roles to hosts or host groups, you can execute them through Satellite to apply consistent configurations and perform routine maintenance operations on your hosts.

2.1. Assigning Ansible roles to an existing host

You can use Ansible roles for remote management of Satellite clients.

Prerequisites

  • Ensure that you have configured and imported Ansible roles.

Procedure

  1. In the Satellite web UI, navigate to Hosts > All Hosts.
  2. Select the host and click Edit.
  3. On the Ansible Roles tab, select the role that you want to add from the Available Ansible Roles list.
  4. Click the + icon to add the role to the host. You can add more than one role.
  5. Click Submit.
  6. Optional: On the Parameters tab, click Add Parameter to add any parameter variables that you want to pass to job templates at run time. This includes all Ansible Playbook parameters and host parameters that you want to associate with the host. To use a parameter variable with an Ansible job template, you must add a Host Parameter.

Next steps

2.2. Removing Ansible roles from a host

Use the following procedure to remove Ansible roles from a host.

Procedure

  1. In the Satellite web UI, navigate to Hosts > All Hosts.
  2. Select the host and click Edit.
  3. Select the Ansible Roles tab.
  4. In the Assigned Ansible Roles area, click the - icon to remove the role from the host. Repeat to remove more roles.
  5. Click Submit.

2.3. Changing the order of Ansible roles

Use the following procedure to change the order of Ansible roles applied to a host.

Procedure

  1. In the Satellite web UI, navigate to Hosts > All Hosts.
  2. Select a host.
  3. Select the Ansible Roles tab.
  4. In the Assigned Ansible Roles area, you can change the order of the roles by dragging and dropping the roles into the preferred position.
  5. Click Submit to save the order of the Ansible roles.

2.4. Running Ansible roles on a host

You can run Ansible roles on a host through the Satellite web UI.

Prerequisites

Procedure

  1. In the Satellite web UI, navigate to Hosts > All Hosts.
  2. Select the checkbox of the host that contains the Ansible role you want to run.
  3. From the Select Action list, select Run all Ansible roles.
  4. You can view the status of your Ansible job on the Run Ansible roles page. To rerun a job, click Rerun.

2.5. Assigning Ansible roles to a host group

You can use Ansible roles for remote management of Satellite clients.

Prerequisites

Procedure

  1. In the Satellite web UI, navigate to Configure > Host Groups.
  2. Click the host group name to which you want to assign an Ansible role.
  3. On the Ansible Roles tab, select the role that you want to add from the Available Ansible Roles list.
  4. Click the + icon to add the role to the host group. You can add more than one role.
  5. Click Submit.

2.6. Running Ansible roles on a host group

You can run Ansible roles on a host group through the Satellite web UI.

Prerequisites

Procedure

  1. In the Satellite web UI, navigate to Configure > Host Groups.
  2. From the list in the Actions column for the host group, select Run all Ansible roles.
  3. You can view the status of your Ansible job on the Run Ansible roles page. Click Rerun to rerun a job.

2.7. Running Ansible roles in check mode

You can run Ansible roles in check mode through the Satellite web UI.

Prerequisites

Procedure

  1. In the Satellite web UI, navigate to Hosts > All Hosts.
  2. Click Edit for the host you want to enable check mode for.
  3. In the Parameters tab, ensure that the host has a parameter named ansible_roles_check_mode with type boolean set to true.
  4. Click Submit.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동