Image by means of Gerd Altmann from Pixabay
Red Hat Ansible Automation Platform (AAP) is a whole suite for multilevel automation duties in on-premises, cloud, edge, and different environments. It additionally handles various kinds of property, from running methods to community units. The platform is modular and is composed of no less than 8 other elements you’ll be able to combine in line with your wishes. The number one element is the automation controller. From there, you’ll be able to enforce and mix the opposite items.
In this text, I center of attention on a kind of itemsโtheย Private Automation Hubโand display you how you can get began with it.
Note: If you’ve got already learn my colleague Ashraf Hassan’s nice article Introducing the brand new Ansible Private Automation Hub, then you recognize what it’s and the way its software-as-a-service (SaaS) style works.ย I beg you to learn this text to be told some core ideas after which come again right here to proceed the step by step means of configuring your personal Hub.
[ Get started with automation controller in this hands-on interactive lab. ]
Ansible Private Automation Hub deployment
To stay this content material as function and concise as imaginable, I may not pass into element in regards to the steps had to set up Private Automation Hub to your atmosphere. I recommend you apply the to be had legit documentation for that data. Instead, I’ll proportion which deployment stock document variables I enabled and the way I set them up.
[root@controller ansible-automation-platform-setup-2.3-1]# pwd
/choose/ansible-automation-platform-setup-2.3-1
[root@controller ansible-automation-platform-setup-2.3-1]# grep hub stock | grep -v '#'
[automationhub]
ansiblehub.instance.native
automationhub_admin_password='mypass'
automationhub_pg_host="ansiblecontroller.example.local"
automationhub_pg_port=5432
automationhub_pg_database="automationhub"
automationhub_pg_username="automationhub"
automationhub_pg_password='mypass'
automationhub_pg_sslmode="prefer"
automationhub_upgrade="true"
automationhub_api_token='mytoken'
Remember that it is a lab atmosphere and that different configuration choices are to be had, particularly in a manufacturing atmosphere. Another helpful be aware is that my automation controller could also be my database host, and I discuss with it as such.
Finally, remember that Private Automation Hub integrates with a Red Hat Single Sign-On (RH-SSO) by means of default, whether or not applied along AAP or an exterior RH-SSO. In my case, I got rid of this integration for my very own get advantages, however do not do that in manufacturing.ย ย
Now that you’ve got some context at the atmosphere, it is time to configure the Private Automation Hub as an on-premises repository for Ansible Collections (it may also be a repository for different sources). It replaces Ansible Galaxy (which is upstream) or the Private Automation Hub within the SaaS style.
Configure and sync the repositories
With the Private Automation Hub put in, configured, and working, get entry to its URL deal with and use the facet menu at the left to navigate to the Repository Management possibility underneath the Collections possibility, as proven beneath.
Two choices are to be had: group (for upstream content material) and rh-certified (for Red Hat-certified content material). I’ll configure each. Click at the ellipses (…) icon to open an enhancing window.
Start with the group repository. Fill within the following values on this window:
- Name: The repository title (robotically crammed)
- URL: The repository URL, on this caseย
- YAML necessities: A YAML document with the names of the collections you wish to have to import. Below is an instance:
---
# necessities.yml
# This necessities document lists all of the collections from
# the crimson hat ansible automation hub that we would like put in on Controller
collections:
- group.basic
- ansible.posix
- Username:: Your Ansible Galaxy username
- Password:ย Your Ansible Galaxy password
Save the document and pass to the following one. Use it to configure the rh-certified repository, proven beneath.
Fill within the following values on this window:
- Name: The repository title (robotically crammed)
- URL: The repository URL, on this caseย
- Token: The token you create within the Red Hat cloud portal (see the legit documentation to create this token)
- SSO URL: The URL to authenticate purchasers to obtain content material from Private Automation Hub, on this case,
- Username: Your Private Automation Hub username
- Password: Your Private Automation Hub password
Once you end, click on the Sync button on each repositories and watch for it to complete synchronizing with the far off repositories. The standing will display as “Running” whilst synchronization takes position.
When each end, the standing adjustments to “Completed.”
Navigate to the facet menu once more within the collections possibility and sub-option of the similar title and alter “Filter by repository” to “Red Hat Certified” to peer all of the new licensed repositories to be had for on-premises use via Private Automation Hub.
If you wish to have extra information about a particular assortment, navigate to it, click on on it, and details about it’s going to be to be had. This means works for modules, set up, documentation, dependencies, and extra. See an instance of the redhat.satellite tv for pc assortment beneath.
To use this assortment, set up it at the goal gadget the usage of the command given within the set up box. The Private Automation Hub will ship it to the gadget. I’ll create a prerequisite configuration for this after which set up a few instance collections.
[ Need more on Ansible? Take a no-cost technical overview course from Red Hat. Ansible Essentials: Simplicity in Automation Technical Overview. ]ย
Define Private Automation Hub as a content material supply
As a excellent safety and management apply, first create a token to attach from the objective gadget on Private Automation Hub to obtain the required collections. To do that, pass to the Collection possibility once more within the facet menu after which to the API-token-management possibility. Click the Load-token way to generate a brand new token. Keep this token protected. If you lose it, you will have to generate a brand new one and each and every time you do, the former token is erased. For obtrusive causes, I may not display my generated token, however most effective the window the place you’ll be able to generate yours.
Go to the Collection possibility once more and make a choice the Repository-management possibility and you’ll be able to see the checklist of synced and in the community to be had repositories.
To use a number of of those repositories to your goal machines, click on at the Copy icon within the box underneath the CLI-configuration possibility. It will reproduction the parameters and configuration had to the objective gadget. With this data, pass to the required goal gadget, edit the /and so on/ansible/ansible.cfg
document, and paste the content material you copied from Private Automation Hub in order that this configuration is globally to be had to your gadget. As a demo, I copied it from the rh-certified and group repositories.ย
# cat /and so on/ansible/ansible.cfg | grep -v '#'
[galaxy]
server_list = rh-certified_repo, community_repo
[galaxy_server.rh-certified_repo]
url=
token=mytoken
[galaxy_server.community_repo]
url=
token=mytoken
Done! I’ve now met all of the necessities to begin the usage of those collections at the goal gadget. It’s time to check it.
Pull and set up collections from Private Automation Hub
If you are already used to doing this with Ansible Galaxy, the method is strictly the similar. The instance beneath presentations the set up of the redhat.satellite tv for pc assortment from the licensed repository and the pressured reinstallation of the ansible.posix assortment from the upstream repository, each configured in my Private Automation Hub as follows.
# ansible-galaxy assortment set up redhat.satellite tv for pc
Starting galaxy assortment set up procedure
Process set up dependency map
Starting assortment set up procedure
Downloading to /root/.ansible/tmp/ansible-local-4150manjntxi/tmpngxsrxpt/redhat-satellite-3.9.0-59s7m38e
[WARNING]: The GnuPG keyring used for assortment signature verification used to be no longer configured however signatures had been equipped by means of the Galaxy server to
examine authenticity. Configure a keyring for ansible-galaxy to make use of or disable signature verification. Skipping signature verification.
Installing 'redhat.satellite tv for pc:3.9.0' to '/root/.ansible/collections/ansible_collections/redhat/satellite tv for pc'
redhat.satellite tv for pc:3.9.0 used to be put in effectively
# ansible-galaxy assortment set up ansible.posix --force
Starting galaxy assortment set up procedure
Process set up dependency map
Starting assortment set up procedure
Downloading to /root/.ansible/tmp/ansible-local-44409w0lnbxs/tmperthobvl/ansible-posix-1.5.1-peo4wva5
[WARNING]: The GnuPG keyring used for assortment signature verification used to be no longer configured however signatures had been equipped by means of the Galaxy server to
examine authenticity. Configure a keyring for ansible-galaxy to make use of or disable signature verification. Skipping signature verification.
Installing 'ansible.posix:1.5.1' to
'/root/.ansible/collections/ansible_collections/ansible/posix'
ansible.posix:1.5.1 used to be put in effectively
# ansible-galaxy assortment checklist
# /root/.ansible/collections/ansible_collections
Collection Version
--------------------------- -------
ansible.posix 1.5.1
redhat.satellite tv for pc 3.9.0
Now that I’ve each collections put in, I will get started the usage of them. For instance, I may just take a look at which modules I’ve to be had for each and every, as proven beneath.
# ansible-doc -l | grep ansible.posix
[WARNING]: Collection redhat.insights does no longer toughen Ansible model 2.14.0
ansible.posix.acl Set and retrieve ...
ansible.posix.at Schedule the exec...
ansible.posix.authorized_key Adds or gets rid of a...
ansible.posix.firewalld Manage arbitrary ...
ansible.posix.firewalld_info Gather informatio...
ansible.posix.mount Control lively an...
ansible.posix.patch Apply patch recordsdata...
ansible.posix.rhel_facts Facts module to s...
ansible.posix.rhel_rpm_ostree Ensure applications e...
ansible.posix.rpm_ostree_upgrade Manage rpm-ostree...
ansible.posix.seboolean Toggles SELinux b...
ansible.posix.selinux Change coverage and...
ansible.posix.synchronize A wrapper round ...
ansible.posix.sysctl Manage entries inโฆ
# ansible-doc -l | grep redhat.satellite tv for pc
[WARNING]: Collection redhat.insights does no longer toughen Ansible model 2.14.0
redhat.satellite tv for pc.activation_key Manage Activation...
redhat.satellite tv for pc.structure Manage Architectu...
redhat.satellite tv for pc.auth_source_ldap Manage LDAP Authe...
redhat.satellite tv for pc.bookmark Manage Bookmarks
redhat.satellite tv for pc.compute_attribute Manage Compute At...
redhat.satellite tv for pc.compute_profile Manage Compute Pr...
redhat.satellite tv for pc.compute_resource Manage Compute Re...
redhat.satellite tv for pc.config_group Manage (Puppet) C...
redhat.satellite tv for pc.content_credential Manage Content Cr...
redhat.satellite tv for pc.content_export_info List content material expo...
redhat.satellite tv for pc.content_export_library Manage library co...
redhat.satellite tv for pc.content_export_repository Manage repository...
redhat.satellite tv for pc.content_export_version Manage content material vi...
redhat.satellite tv for pc.content_upload Upload content material to...
redhat.satellite tv for pc.content_view Manage Content Vi...
redhat.satellite tv for pc.content_view_filter Manage Content Vi...
redhat.satellite tv for pc.content_view_filter_info Fetch data...
redhat.satellite tv for pc.content_view_filter_rule Manage content material vi...
redhat.satellite tv for pc.content_view_filter_rule_info Fetch data...
redhat.satellite tv for pc.content_view_info Fetch data...
redhat.satellite tv for pc.content_view_version Manage Content Vi...
redhat.satellite tv for pc.content_view_version_info Fetch data...
redhat.satellite tv for pc.discovery_rule Manage Host Disco...
redhat.satellite tv for pc.area Manage Domains
redhat.satellite tv for pc.domain_info Fetch data...
redhat.satellite tv for pc.external_usergroup Manage External U...
redhat.satellite tv for pc.global_parameter Manage Global Par...
redhat.satellite tv for pc.hardware_model Manage Hardware M...
redhat.satellite tv for pc.host Manage Hosts
redhat.satellite tv for pc.host_collection Manage Host Colle...
redhat.satellite tv for pc.host_errata_info Fetch data...
redhat.satellite tv for pc.host_info Fetch data...
redhat.satellite tv for pc.host_power Manage Power Stat...
redhat.satellite tv for pc.hostgroup Manage Hostgroups
redhat.satellite tv for pc.hostgroup_info Get data a...
redhat.satellite tv for pc.http_proxy Manage HTTP Proxi...
redhat.satellite tv for pc.symbol Manage Images
redhat.satellite tv for pc.installation_medium Manage Installati...
redhat.satellite tv for pc.job_invocation Invoke Remote Exe...
redhat.satellite tv for pc.job_template Manage Job Templa...
redhat.satellite tv for pc.lifecycle_environment Manage Lifecycle ...
redhat.satellite tv for pc.location Manage Locations
redhat.satellite tv for pc.operatingsystem Manage Operating ...
redhat.satellite tv for pc.group Manage Organizati...
redhat.satellite tv for pc.organization_info Get data a...
redhat.satellite tv for pc.os_default_template Manage Default Te...
redhat.satellite tv for pc.partition_table Manage Partition ...
redhat.satellite tv for pc.product Manage Products
redhat.satellite tv for pc.provisioning_template Manage Provisioni...
redhat.satellite tv for pc.puppet_environment Manage Puppet Env...
redhat.satellite tv for pc.puppetclasses_import Import Puppet Cla...
redhat.satellite tv for pc.realm Manage Realms
redhat.satellite tv for pc.redhat_manifest Interact with a R...
redhat.satellite tv for pc.repository Manage Repositori...
redhat.satellite tv for pc.repository_info Fetch data...
redhat.satellite tv for pc.repository_set Enable/disable Re...
redhat.satellite tv for pc.repository_set_info Fetch data...
redhat.satellite tv for pc.repository_sync Sync a Repository...
redhat.satellite tv for pc.resource_info Gather informatio...
redhat.satellite tv for pc.function Manage Roles
redhat.satellite tv for pc.scap_content Manage SCAP conte...
redhat.satellite tv for pc.scap_tailoring_file Manage SCAP Tailo...
redhat.satellite tv for pc.environment Manage Settings
redhat.satellite tv for pc.setting_info Fetch data...
redhat.satellite tv for pc.smart_class_parameter Manage Smart Clas...
redhat.satellite tv for pc.smart_proxy Manage Smart Prox...
redhat.satellite tv for pc.status_info Get standing data
redhat.satellite tv for pc.subnet Manage Subnets
redhat.satellite tv for pc.subnet_info Fetch data...
redhat.satellite tv for pc.subscription_info Fetch data...
redhat.satellite tv for pc.subscription_manifest Manage Subscripti...
redhat.satellite tv for pc.sync_plan Manage Sync Plans
redhat.satellite tv for pc.templates_import Sync Templates fr...
redhat.satellite tv for pc.person Manage Users
redhat.satellite tv for pc.usergroup Manage User Group...
You can useย Ansible playbooks to try this setup and obtain collections robotically on different machines to your atmosphere.
Wrap up
Red Hat Ansible Automation Platform supplies a whole and modular suite for every type of automation. One of its modular products and services is Private Automation Hub, which you’ll be able to deploy within the on-premises style. That manner, you’ll be able to have all of the vital content materialโlike collectionsโto be had in your atmosphere in a managed manner. Private Automation Hub additionally supplies many different options, however the ones are topics for different articles.
No Comment! Be the first one.