Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Linux » Using Awx to deploy, schedule and run playbooks
  • chocolatey
    Windows Package Manager: How to install, upgrade or uninstall Chocolatey Windows
  • Enable TPM and ecure boot on HyperV to run windoows 11
    How to run Windows 11 on HyperV Virtualization
  • group policy 1280x720 1
    Error: The processing of Group Policy failed because of lack of network connectivity to a DC. This may be a transient condition. A success message would be generated once the machine gets connected Windows Server
  • asdfgh
    All Group Policies (GPO) available to configure Microsoft Edge settings Windows Server
  • slide10
    Add Dynamic Wallpaper controlled by time on Windows 10 and 11 Windows
  • Defender Antivirus
    Windows Defender Antivirus Management with Intune Anti-Virus Solution
  • Copy files between host and workstation
    Various ways to copy files from host to VMware Workstation VM Virtualization
  • Upstream branch in Git 1
    Set up and use an upstream branch in Git Version Control System

Using Awx to deploy, schedule and run playbooks

Posted on 14/10/202104/05/2024 Dickson Victor By Dickson Victor 1 Comment on Using Awx to deploy, schedule and run playbooks
AWX deployment

In the previous tutorial, we deployed AWX. Kindly view the tutorial on Ansible AWX. Now we will use AWX to deploy a simple playbook and show how to run, schedule, and manage jobs from the AWX console. Kindly check out some of my other guides: Openstack Deployment with Devstack, Deploying a load balancer from scratch and adding backend servers, how to monitor services using Zabbix, and how to set-up PowerShell on a Linux server.

First, log in to our Awx console using the admin credentials and create an inventory.

Playbook scheduling
Automation workflows

Setting Up the Deployment Host and Inventory Configuration

Next, Create a host. This host is where all your playbooks will be deployed on and add the IP address and description also select your test or default inventory

Task orchestration

Create your credential. Ansible uses SSH Keys, however from AWX, you can use login credentials like username and password

AWX deployment
Playbook scheduling

The next step is to create a template. However, your template needs to have an existing playbook in the AWX server. Let’s create a sample uptime playbook to test.

cd /var/lib/awx/projects/ (The default awx directory)
mkdir playbook

Therefore, mkdir playbook for your current project and create your playbook in the directory

vim uptime.yaml and paste the below content (In my case I used test.yaml)
--- 

 -hosts: all
  gather_facts: true
  become: yes
  become_user: root
  become_method: sudo

  tasks:
  - name: uptime
  command: uptime      
  register: uptime

Nevertheless, Once done, we can go back to the dashboard and create our template

Task orchestration

Save and launch

image-147

Similarly, Now we can see if the task was successful

image-148

Consequently, We can also schedule a playbook to be run daily, weekly, or monthly. Nonetheless, Go to template, click on the preferred template navigate to schedule, and add a schedule

image-149
image-150

With the capabilities of AWX, deploying schedules and running playbooks has never been more seamless. Moreover, Utilizing AWX, you can now conveniently monitor the progress of your playbook jobs, whether they were executed successfully or encountered failures.

image-151

Furthermore, Utilizing AWX to deploy, schedule, and run playbooks enables efficient management and execution of tasks across lab and production environments.

However, AWX is a powerful tool that enhances the usability of Ansible, offering accessible control, graphical management, and seamless inventory synchronization. Additionally, AWX ensures comprehensive job logging, providing a comprehensive record of all executed tasks.

Now, you can create your playbooks and run them from AWX.

I hope you found this article useful on “Using Awx to deploy schedule and run playbooks”. Please feel free to leave a comment below.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Linux

Post navigation

Previous Post: Configure Azure Monitor for VMs on Azure Stack Hub
Next Post: Hide Default BitLocker Drive Encryption item in Windows

Related Posts

  • DNS FEATURE
    Domain Name System: All you need to know about DNS Linux
  • TERRAFORM ON LINUX FEATURE IMAGE
    How to Install Terraform on Linux Linux
  • Slide1
    Read-only Files: Saving Files in VIM Editor on Linux/Unix-like OS Linux
  • Manage Log Files via Logrotate
    How To Use Logrotate For Managing Log Files In Ubuntu Linux Linux
  • RUST FEATURE
    How to install Rust in a Linux System Linux
  • SystemUtilization
    Delivering System Utilization Report on a Linux based OS Linux

More Related Articles

DNS FEATURE Domain Name System: All you need to know about DNS Linux
TERRAFORM ON LINUX FEATURE IMAGE How to Install Terraform on Linux Linux
Slide1 Read-only Files: Saving Files in VIM Editor on Linux/Unix-like OS Linux
Manage Log Files via Logrotate How To Use Logrotate For Managing Log Files In Ubuntu Linux Linux
RUST FEATURE How to install Rust in a Linux System Linux
SystemUtilization Delivering System Utilization Report on a Linux based OS Linux

Comment (1) on “Using Awx to deploy, schedule and run playbooks”

  1. Avatar photo ursr says:
    02/02/2022 at 9:50 PM

    thanks for this article. can you please look over the published playbook above? when I try to use it I get no end of syntax error warnings in awx and I can’t follow the example. it starts with four dashes and yaml is supposed to start with three then it complains about other yaml syntax issues. thanks for fixing those.

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a
 
  • chocolatey
    Windows Package Manager: How to install, upgrade or uninstall Chocolatey Windows
  • Enable TPM and ecure boot on HyperV to run windoows 11
    How to run Windows 11 on HyperV Virtualization
  • group policy 1280x720 1
    Error: The processing of Group Policy failed because of lack of network connectivity to a DC. This may be a transient condition. A success message would be generated once the machine gets connected Windows Server
  • asdfgh
    All Group Policies (GPO) available to configure Microsoft Edge settings Windows Server
  • slide10
    Add Dynamic Wallpaper controlled by time on Windows 10 and 11 Windows
  • Defender Antivirus
    Windows Defender Antivirus Management with Intune Anti-Virus Solution
  • Copy files between host and workstation
    Various ways to copy files from host to VMware Workstation VM Virtualization
  • Upstream branch in Git 1
    Set up and use an upstream branch in Git Version Control System

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,841 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.