{"id":15350,"date":"2022-10-06T07:03:00","date_gmt":"2022-10-06T07:03:00","guid":{"rendered":"https:\/\/www.insentragroup.com\/nz\/?p=15350"},"modified":"2024-12-13T01:57:18","modified_gmt":"2024-12-13T01:57:18","slug":"how-to-create-an-ansible-automation-container-group","status":"publish","type":"post","link":"https:\/\/www.insentragroup.com\/nz\/insights\/geek-speak\/modern-workplace\/how-to-create-an-ansible-automation-container-group\/","title":{"rendered":"How to Create an Ansible Automation Container Group"},"content":{"rendered":"\n<p>If you\u2019re in IT, you\u2019ll notice you\u2019ve been hearing about <a href=\"https:\/\/www.insentragroup.com\/nz\/insights\/geek-speak\/modern-workplace\/introduction-to-ansible-builder\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ansible<\/a> more and more lately. CIO has said \u201cAnsible has come from nowhere to be the number one choice for software automation in many organizations.\u201d &nbsp;&nbsp;<\/p>\n\n\n\n<p>The controller in Ansible Automation Platform allows for jobs to be executed via the Ansible playbook, either directly on a member of the cluster or in a namespace of an OpenShift cluster with the required service account provisioned (called a Container Group).&nbsp;<\/p>\n\n\n\n<p>Jobs are executed on the controller, which are authorised by Container Groups, regardless of whether the controller is installed as a standalone, in a virtual environment or in a container. Container Groups operate as a group of resources within a virtual environment. It&#8217;s possible to create Instance Groups which point to an OpenShift Container, which are job environments provisioned on-demand as a Pod and exists only for the duration of the playbook run. This mode of execution is known as the ephemeral execution model and ensures a clean environment for every job run.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Create a Container Group<\/strong><\/h2>\n\n\n\n<p>A ContainerGroup is a type of InstanceGroup which has an associated Credential and allows for connecting to an OpenShift cluster. To set up a container group, it is necessary to have the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>An OpenShift namespace the pod can be launched into (every cluster has a \u201cdefault\u201d namespace, but this namespace should not be used for the purpose of the container group).<\/li><li>An OpenShift service account with the role granting permissions to launch and manage Pods and secrets in this namespace.<\/li><li>If you will be using execution environments in a private registry and have a Container Registry credential associated to them in the automation controller, the service account also needs the roles to get, create, and delete secrets in the namespace. If you do not want to give these roles to the service account, you can pre-create the ImagePullSecrets and specify them on the pod spec for the ContainerGroup. In this case, the execution environment should NOT have a Container Registry credential associated, or the controller will attempt to create the secret for you in the namespace.<\/li><li>A token associated with the service account (OpenShift or Kubernetes Bearer Token).<\/li><li>A CA certificate associated with the cluster.<\/li><\/ul>\n\n\n\n<p>The following section describes creating a Service Account in an OpenShift cluster (or K8s) in order to be used to run jobs in a container group via an automation controller. After the Service Account is created, its credentials are provided to the controller in the form of an OpenShift or Kubernetes API bearer token credential. Below describes how to create a Service Account and collect the required information for configuring the automation controller.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>The Process<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Log into the OCP as kubeadmin or the user with admin privileges.<\/li><li>Create a new namespace:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>$ oc new-project aap-containergroup-cus<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>Update the following file as required. It is important to update the namespace to match the project name. Once all updates are done. Save the file as containergroup-sa.yml.<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>apiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: containergroup-service-account\n  namespace: aap-containergroup-cus\n---\nkind: Role\napiVersion: rbac.authorization.k8s.io\/v1\nmetadata:\n  name: role-containergroup-service-account\n  namespace: aap-containergroup-cus\nrules:\n- apiGroups: &#91;\"\"]\n  resources: &#91;\"pods\"]\n  verbs: &#91;\"get\", \"list\", \"watch\", \"create\", \"update\", \"patch\", \"delete\"]\n- apiGroups: &#91;\"\"]\n  resources: &#91;\"pods\/log\"]\n  verbs: &#91;\"get\", \"list\", \"watch\", \"create\", \"update\", \"patch\", \"delete\"]\n- apiGroups: &#91;\"\"]\n  resources: &#91;\"pods\/attach\"]\n  verbs: &#91;\"get\", \"list\", \"watch\", \"create\", \"update\", \"patch\", \"delete\"]\n- apiGroups: &#91;\"\"]\n  resources: &#91;\"secrets\"]\n  verbs: &#91;\"get\", \"list\", \"watch\", \"create\", \"update\", \"patch\", \"delete\"]\n---\nkind: RoleBinding\napiVersion: rbac.authorization.k8s.io\/v1\nmetadata:\n  name: role-containergroup-service-account-binding\n  namespace: aap-containergroup-cus\nsubjects:\n- kind: ServiceAccount\n  name: containergroup-service-account\n  namespace: aap-containergroup-cus\nroleRef:\n  kind: Role\n  name: role-containergroup-service-account\n  apiGroup: rbac.authorization.k8s.io\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>Create the service account and the role:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>oc apply -f containergroup-sa.yml<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>Get the secret name associated with the service account:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>export SA_SECRET=$(oc get sa containergroup-service-account -o json | jq '.secrets&#91;0].name' | tr -d '\"')<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\"><li>Get the token from the secret:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>oc get secret $(echo ${SA_SECRET}) -o json | jq '.data.token' | xargs | base64 --decode &gt; containergroup-sa.token<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"7\"><li>Get the CA cert:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>oc get secret $SA_SECRET -o json | jq '.data&#91;\"ca.crt\"]' | xargs | base64 --decode &gt; containergroup-ca.crt<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"8\"><li>Create a new OpenShift secret which will be used to pull the image from the Private Hub. Ensure the \u2018&#8211;docker-server&#8217; is set to a correct Private Hub:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>oc create secret docker-registry pah-secret \\\n    --docker-server=ansible-npd-automationhub.ocp.example.com \\\n    --docker-username=admin \\\n    --docker-password=your_password\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"9\"><li>Link the secret to the service account:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>oc secrets link containergroup-service-account pah-secret --for=pull<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"10\"><li>Ensure the \u2018Image Pull Secret\u2019 is associated with the service account:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code># oc describe sa\/containergroup-service-account\n \nName:                containergroup-service-account\nNamespace:           aap-containergroup-01\nLabels:              &lt;none&gt;\nAnnotations:         &lt;none&gt;\nImage pull secrets:  containergroup-service-account-dockercfg-dld9s\n                     pah-secret\nMountable secrets:   containergroup-service-account-dockercfg-dld9s\n                     containergroup-service-account-token-shkbp\nTokens:              containergroup-service-account-token-j2mkg\n                     containergroup-service-account-token-shkbp\nEvents:              &lt;none&gt;\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\" start=\"11\"><li>Navigate to \u2018AAP UI\u2019 and log in with administrative privileges.<\/li><li>Navigate to \u2018credentials\u2019 and create a new credential OpenShift or Kubernetes API Bearer Token. Use the Openshift API Endpoint as indicated below. Use the bearer token from the \u2018containergroup-sa.token\u2019 file created in the previous step and Certificate Authority data from the \u2018containergroup-sa.crt\u2019 file.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"983\" height=\"559\" src=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image.png\" alt=\"\" class=\"wp-image-15351\" srcset=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image.png 983w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-300x171.png 300w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-768x437.png 768w\" sizes=\"(max-width: 983px) 100vw, 983px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"13\"><li>Navigate to \u2018Instance Groups\u2019 and click \u2018add\u2019. Specify the name and the credential created in a previous step. Select \u2018Customize pod specification\u2019. Ensure to update the namespace and the Private Hub\/image (if required). Specify the \u2018imagePullSecret (pah-secret)\u2019:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>apiVersion: v1\nkind: Pod\nmetadata:\n  namespace: aap-containergroup-cus\nspec:\n  serviceAccountName: containergroup-service-account\n  automountServiceAccountToken: false\n  containers:\n    - image: &gt;-\n        ansible-npd-automationhub.ocp.example.com\/aap_ee_image\n      name: worker\n      imagePullSecrets:\n      - name: pah-secret\n      imagePullPolicy: Always\n      args:\n        - ansible-runner\n        - worker\n        - '--private-data-dir=\/runner'\n      resources:\n        requests:\n          cpu: 250m\n          memory: 100Mi\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"14\"><li>Click \u2018save\u2019.<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Testing<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Navigate to the \u2018Inventories\u2019 section of AAP.<\/li><li>Create a new inventory. For example: INV-CG-TEST.<\/li><li>Click on \u2018Hosts\u2019 and add a localhost:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"381\" src=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-1-1024x381.png\" alt=\"\" class=\"wp-image-15352\" srcset=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-1-1024x381.png 1024w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-1-300x112.png 300w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-1-768x286.png 768w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-1.png 1081w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>Specify the variables as noted above:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>{'ansible_host': '127.0.0.1', 'ansible_connection': 'local'}<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>Save.<\/li><li>Select the \u2018localhost\u2019 and click \u2018Run Command\u2019:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"297\" src=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-2-1024x297.png\" alt=\"\" class=\"wp-image-15353\" srcset=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-2-1024x297.png 1024w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-2-300x87.png 300w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-2-768x223.png 768w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-2.png 1075w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"7\"><li>Choose the module \u2018setup\u2019 and click \u2018Next\u2019:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"896\" height=\"616\" src=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-3.png\" alt=\"\" class=\"wp-image-15354\" srcset=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-3.png 896w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-3-300x206.png 300w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-3-768x528.png 768w\" sizes=\"(max-width: 896px) 100vw, 896px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"8\"><li>In the initial run, do not select any Execution Environments and click \u2018Next\u2019:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"955\" height=\"658\" src=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-4.png\" alt=\"\" class=\"wp-image-15355\" srcset=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-4.png 955w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-4-300x207.png 300w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-4-768x529.png 768w\" sizes=\"(max-width: 955px) 100vw, 955px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"9\"><li>Select \u2018Demo Credentials\u2019 (or any other) and click \u2018Next\u2019:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1009\" height=\"673\" src=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-5.png\" alt=\"\" class=\"wp-image-15356\" srcset=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-5.png 1009w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-5-300x200.png 300w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-5-768x512.png 768w\" sizes=\"(max-width: 1009px) 100vw, 1009px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"10\"><li>Before clicking \u2018Launch\u2019, open the session to the server where you can execute \u2018oc\u2019 commands. Ensure you are in the context of the project\/namespace used for the container group and run. This will allow you to monitor the pods created for the execution:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>oc get pods -o wide -w<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"11\"><li>Click \u2018Launch\u2019:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"885\" height=\"607\" src=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-6.png\" alt=\"\" class=\"wp-image-15357\" srcset=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-6.png 885w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-6-300x206.png 300w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-6-768x527.png 768w\" sizes=\"(max-width: 885px) 100vw, 885px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"12\"><li>If the AAP controller can communicate with the OCP cluster and the configuration is correct, you should expect the following results:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"513\" src=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-7.png\" alt=\"\" class=\"wp-image-15358\" srcset=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-7.png 1024w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-7-300x150.png 300w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-7-768x385.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>and from oc get pods command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ oc get pods -o wide -w\nNAME                       READY   STATUS    RESTARTS   AGE   IP       NODE     NOMINATED NODE   READINESS GATES\nautomation-job-108-hvbsv   0\/1     Pending   0          0s    &lt;none&gt;   &lt;none&gt;   &lt;none&gt;           &lt;none&gt;\nautomation-job-108-hvbsv   0\/1     Pending   0          0s    &lt;none&gt;   aro-cus-npd-clu01-pn279-d8s-worker-centralus2-xsf6p   &lt;none&gt;           &lt;none&gt;\nautomation-job-108-hvbsv   0\/1     ContainerCreating   0          0s    &lt;none&gt;   aro-cus-npd-clu01-pn279-d8s-worker-centralus2-xsf6p   &lt;none&gt;           &lt;none&gt;\nautomation-job-108-hvbsv   0\/1     ContainerCreating   0          2s    &lt;none&gt;   aro-cus-npd-clu01-pn279-d8s-worker-centralus2-xsf6p   &lt;none&gt;           &lt;none&gt;\nautomation-job-108-hvbsv   1\/1     Running             0          4s    10.207.14.245   aro-cus-npd-clu01-pn279-d8s-worker-centralus2-xsf6p   &lt;none&gt;           &lt;none&gt;\nautomation-job-108-hvbsv   0\/1     Completed           0          7s    10.207.14.245   aro-cus-npd-clu01-pn279-d8s-worker-centralus2-xsf6p   &lt;none&gt;           &lt;none&gt;\nautomation-job-108-hvbsv   0\/1     Terminating         0          7s    10.207.14.245   aro-cus-npd-clu01-pn279-d8s-worker-centralus2-xsf6p   &lt;none&gt;           &lt;none&gt;\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"13\"><li>Check the events:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>$ oc get events\nLAST SEEN   TYPE     REASON           OBJECT                         MESSAGE\n2m24s       Normal   Scheduled        pod\/automation-job-108-hvbsv   Successfully assigned aap-containergroup-01\/automation-job-108-hvbsv to aro-cus-npd-clu01-pn279-d8s-worker-centralus2-xsf6p\n2m22s       Normal   AddedInterface   pod\/automation-job-108-hvbsv   Add eth0 &#91;10.207.14.245\/23] from openshift-sdn\n2m22s       Normal   Pulling          pod\/automation-job-108-hvbsv   Pulling image \"registry.redhat.io\/ansible-automation-platform-22\/ee-supported-rhel8@sha256:8b8cdac85133daaa051d2d4d42cebb15ed41c01caf7dc75e5eeb8a895a0045b5\"\n2m21s       Normal   Pulled           pod\/automation-job-108-hvbsv   Successfully pulled image \"registry.redhat.io\/ansible-automation-platform-22\/ee-supported-rhel8@sha256:8b8cdac85133daaa051d2d4d42cebb15ed41c01caf7dc75e5eeb8a895a0045b5\" in 1.317926879s\n2m21s       Normal   Created          pod\/automation-job-108-hvbsv   Created container worker\n2m21s       Normal   Started          pod\/automation-job-108-hvbsv   Started container worker\n<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"14\"><li>Perform the test using the Execution Environment stored on the Private Hub. Ensure you are using the Template which has been already tested with this Execution Environment and the result was successful. Note the Instance Group selection (container group) and the Execution Environment. You should see in OCP events image pull from the PAH:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"978\" height=\"907\" src=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-8.png\" alt=\"\" class=\"wp-image-15359\" srcset=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-8.png 978w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-8-300x278.png 300w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-8-768x712.png 768w\" sizes=\"(max-width: 978px) 100vw, 978px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"405\" src=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-9.png\" alt=\"\" class=\"wp-image-15360\" srcset=\"https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-9.png 979w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-9-300x124.png 300w, https:\/\/www.insentragroup.com\/nz\/wp-content\/uploads\/sites\/18\/2022\/10\/image-9-768x318.png 768w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>\n$ oc get pods -o wide -w\nNAME                       READY   STATUS    RESTARTS   AGE   IP              NODE                                                  NOMINATED NODE   READINESS GATES\nautomation-job-109-gzggz   1\/1     Running   0          19s   10.207.17.180   aro-cus-npd-clu01-pn279-d8s-worker-centralus3-g4r4q   &lt;none&gt;           &lt;none&gt;\nautomation-job-109-gzggz   0\/1     Completed   0          75s   10.207.17.180   aro-cus-npd-clu01-pn279-d8s-worker-centralus3-g4r4q   &lt;none&gt;           &lt;none&gt;\nautomation-job-109-gzggz   0\/1     Terminating   0          75s   10.207.17.180   aro-cus-npd-clu01-pn279-d8s-worker-centralus3-g4r4q   &lt;none&gt;           &lt;none&gt;\n$ oc get events\nLAST SEEN   TYPE     REASON           OBJECT                         MESSAGE\n2m50s       Normal   Scheduled        pod\/automation-job-109-gzggz   Successfully assigned aap-containergroup-01\/automation-job-109-gzggz to aro-cus-npd-clu01-pn279-d8s-worker-centralus3-g4r4q\n2m49s       Normal   AddedInterface   pod\/automation-job-109-gzggz   Add eth0 &#91;10.207.17.180\/23] from openshift-sdn\n2m49s       Normal   Pulling          pod\/automation-job-109-gzggz   Pulling image \"ansible-npd-automationhub.ocp.example.com\/satellite_ee_image:latest\"\n2m48s       Normal   Pulled           pod\/automation-job-109-gzggz   Successfully pulled image \"ansible-npd-automationhub.ocp.example.com\/satellite_ee_image:latest\" in 1.055586975s\n2m47s       Normal   Created          pod\/automation-job-109-gzggz   Created container worker\n2m47s       Normal   Started          pod\/automation-job-109-gzggz   Started container worker\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>To sum up our step-by-step guide, using Ansible Automation Container Groups can significantly simplify your processes!<\/p>\n\n\n\n<p>In this article, we hope to have given you some in-depth knowledge of how to create an Ansible Automation Container Group.<\/p>\n\n\n\n<p>To find out more about how you can be more valuable to your organisation, learn about <a href=\"https:\/\/www.insentragroup.com\/nz\/services\/professional-services\/modern-workplace\/\" target=\"_blank\" rel=\"noreferrer noopener\">Insentra\u2019s Professional Services experts<\/a>. &nbsp;<\/p>\n\n\n\n<p>As always, please <a href=\"https:\/\/www.insentragroup.com\/nz\/contact\/\" target=\"_blank\" rel=\"noreferrer noopener\">contact us<\/a> if you need any assistance with your IT requirements to see how we can help.<\/p>\n\n\n\n<style>\nbody .wp-block-code>code {\n    color: #000;\n    background: #ccc;\n}\n<\/style>\n","protected":false},"excerpt":{"rendered":"<p>Want to use Container Groups to run Ansible Automation Platform jobs? Then this article is for you!<\/p>\n","protected":false},"author":67,"featured_media":15362,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[19],"tags":[],"class_list":["post-15350","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-modern-workplace","entry"],"_links":{"self":[{"href":"https:\/\/www.insentragroup.com\/nz\/wp-json\/wp\/v2\/posts\/15350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.insentragroup.com\/nz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.insentragroup.com\/nz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.insentragroup.com\/nz\/wp-json\/wp\/v2\/users\/67"}],"replies":[{"embeddable":true,"href":"https:\/\/www.insentragroup.com\/nz\/wp-json\/wp\/v2\/comments?post=15350"}],"version-history":[{"count":3,"href":"https:\/\/www.insentragroup.com\/nz\/wp-json\/wp\/v2\/posts\/15350\/revisions"}],"predecessor-version":[{"id":15364,"href":"https:\/\/www.insentragroup.com\/nz\/wp-json\/wp\/v2\/posts\/15350\/revisions\/15364"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.insentragroup.com\/nz\/wp-json\/wp\/v2\/media\/15362"}],"wp:attachment":[{"href":"https:\/\/www.insentragroup.com\/nz\/wp-json\/wp\/v2\/media?parent=15350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.insentragroup.com\/nz\/wp-json\/wp\/v2\/categories?post=15350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.insentragroup.com\/nz\/wp-json\/wp\/v2\/tags?post=15350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}