Questo contenuto non è disponibile nella lingua selezionata.
Chapter 4. Running the playbook
After you define variable settings, you can run the playbook to begin the automated installation process. You can run a playbook by using the ansible-playbook command on the control node or by using the Red Hat Ansible automation controller. The JBoss EAP collection then handles all installation and deployment tasks automatically.
The following procedure assumes that you have created and updated a custom playbook.
Prerequisites
- You have enabled an automated deployment of JBoss EAP.
- You are familiar with general Ansible concepts and creating Ansible playbooks. For more information, see the Ansible documentation.
Your playbook also includes an appropriate link to the location where you have defined your variables.
For example:
--- [...] vars_files: - <path_to_vars_file>/vars.yml [...]The preceding example assumes that you have defined variables in a
vars.ymlfile. Replace <path_to_vars_file> with the appropriate path.Your playbook also specifies the
eap_installandeap_systemdroles.For example:
--- [...] roles: - eap_install - eap_systemd [...]NoteThe
eap_installrole controls the installation of JBoss EAP. Theeap_systemdrole controls the YAML-based configuration of JBoss EAP subsystems and the setup of JBoss EAP as aneapservice that is managed bysystemd.- Red Hat Enterprise Linux (RHEL) version 8 or 9 is already installed on your target hosts.
Procedure
Perform either of the following steps:
On your Ansible control node, enter the following command:
$ ansible-playbook <playbook_name>.ymlIn the preceding command, replace <playbook_name> with the name you have assigned to your playbook. The preceding command assumes that your user account supports passwordless authentication.
NoteIf your user account requires password authentication, you can run the preceding command with the
--ask-sudo-passoption and specify the required password when prompted. For example:$ ansible-playbook <playbook_name>.yml --ask-sudo-pass- Use the Red Hat Ansible automation controller to run your playbook. For more information about getting started with the automation controller, see the Red Hat Ansible Automation Platform documentation page.