Chapter 2. Installing the JBoss Web Server collection
As a first step toward automating deployments of Red Hat JBoss Web Server by using Ansible, you must download and install the JBoss Web Server collection from Ansible automation hub. The JBoss Web Server collection is named redhat.jws
in Ansible automation hub. Before you install the JBoss Web Server collection, you must ensure that your system complies with certain prerequisites.
Prerequisites
You have installed the
ansible-core
package version 2.14 or later on a control node in your system by installing Red Hat Ansible Automation Platform 2.x.For more information about installing Red Hat Ansible Automation Platform, see the Red Hat Ansible Automation Platform Installation Guide.
-
You have updated the
ansible.cfg
file to use Ansible automation hub as your primary source of Ansible collections. For more information about updating theansible.cfg
file, see Getting started with automation hub.
Procedure
On your Ansible control node, enter the following command:
$ ansible-galaxy collection install redhat.jws
NoteIf the preceding command produces a
Failed to find collection redhat.jws:*
error message, ensure that you have updated theansible.cfg
file correctly to use Ansible automation hub, as described in Getting started with automation hub.The preceding command produces the following output:
Starting galaxy collection install process Process install dependency map Starting collection install process ... redhat.jws:2.0.x was installed successfully ... redhat.runtimes_common:<version> was installed successfully ... ansible.posix:<version> was installed successfully
For the sake of brevity, the preceding example uses ellipses to denote omitted text. In the preceding output,
2.0.x
represents the full version number of theredhat.jws
collection (for example,2.0.0
). Similarly,<version>
represents the latest available versions of the installedredhat.runtimes_common
andansible.posix
collections.
Verification
On your Ansible control node, enter the following command:
$ ansible-galaxy collection list
The preceding command displays the list of installed collections. For example:
Collection Version -------------------------- ------- ansible.posix <version> redhat.jws 2.0.0 redhat.runtimes_common <version> ...
As shown in the preceding example, when you install the redhat.jws
collection, the latest versions of the ansible.posix
and redhat.runtimes_common
collections are also automatically downloaded and installed on your Ansible control node. The redhat.runtimes_common
collection provides a set of standard utilities to support the automated deployment of various Red Hat Runtimes products such as JBoss Web Server.
If the latest versions of the ansible.posix
and redhat.runtimes_common
collections already exist on your Ansible control node, these collections are not automatically installed again.
Additional resources