{"id":108,"date":"2025-07-07T20:54:03","date_gmt":"2025-07-07T17:54:03","guid":{"rendered":"https:\/\/www.gigansoft.com\/?p=108"},"modified":"2025-07-07T20:54:03","modified_gmt":"2025-07-07T17:54:03","slug":"gigansoft-ansible-awx-automatisation","status":"publish","type":"post","link":"https:\/\/www.gigansoft.com\/index.php\/2025\/07\/07\/gigansoft-ansible-awx-automatisation\/","title":{"rendered":"Gigansoft Ansible AWX Automatisation"},"content":{"rendered":"<h1 data-start=\"361\" data-end=\"463\"><strong data-start=\"363\" data-end=\"463\">Automating Infrastructure: Server Provisioning with vCenter and Network Backups with Ansible AWX<\/strong><\/h1>\n<p data-start=\"465\" data-end=\"813\">As enterprise IT infrastructure continues to grow in complexity, automation becomes a critical pillar of efficiency, consistency, and security. Leveraging tools like <strong data-start=\"631\" data-end=\"646\">Ansible AWX<\/strong> and <strong data-start=\"651\" data-end=\"669\">VMware vCenter<\/strong>, organizations can standardize server deployments and automate network device backups\u2014minimizing manual errors and freeing up engineering time.<\/p>\n<p data-start=\"815\" data-end=\"877\">In this article, we\u2019ll explore how to use <strong data-start=\"857\" data-end=\"872\">Ansible AWX<\/strong> for:<\/p>\n<ul data-start=\"879\" data-end=\"1052\">\n<li data-start=\"879\" data-end=\"926\">\n<p data-start=\"881\" data-end=\"926\">Automated VM provisioning through <strong data-start=\"915\" data-end=\"926\">vCenter<\/strong><\/p>\n<\/li>\n<li data-start=\"927\" data-end=\"990\">\n<p data-start=\"929\" data-end=\"990\">Scheduled configuration backups from <strong data-start=\"966\" data-end=\"990\">switches and routers<\/strong><\/p>\n<\/li>\n<li data-start=\"991\" data-end=\"1052\">\n<p data-start=\"993\" data-end=\"1052\">Centralized visibility and audit of all playbook executions<\/p>\n<\/li>\n<\/ul>\n<p data-start=\"1054\" data-end=\"1214\">Whether you\u2019re running a hybrid datacenter or a fully virtualized environment, combining Ansible with VMware and your network gear can deliver powerful results.<\/p>\n<hr data-start=\"1216\" data-end=\"1219\" \/>\n<h2 data-start=\"1221\" data-end=\"1247\">\ud83d\udd27 What is Ansible AWX?<\/h2>\n<p data-start=\"1249\" data-end=\"1341\"><strong data-start=\"1249\" data-end=\"1264\">Ansible AWX<\/strong> is the open-source, web-based interface for Ansible automation. It provides:<\/p>\n<ul data-start=\"1343\" data-end=\"1479\">\n<li data-start=\"1343\" data-end=\"1372\">\n<p data-start=\"1345\" data-end=\"1372\">Role-based access control<\/p>\n<\/li>\n<li data-start=\"1373\" data-end=\"1405\">\n<p data-start=\"1375\" data-end=\"1405\">Job templates and scheduling<\/p>\n<\/li>\n<li data-start=\"1406\" data-end=\"1435\">\n<p data-start=\"1408\" data-end=\"1435\">Real-time job output logs<\/p>\n<\/li>\n<li data-start=\"1436\" data-end=\"1479\">\n<p data-start=\"1438\" data-end=\"1479\">Git integration for playbook repositories<\/p>\n<\/li>\n<\/ul>\n<p data-start=\"1481\" data-end=\"1632\">Think of it as your central DevOps control tower \u2014 enabling both sysadmins and network engineers to trigger, track, and report on all automation tasks.<\/p>\n<hr data-start=\"1634\" data-end=\"1637\" \/>\n<h2 data-start=\"1639\" data-end=\"1685\">\ud83d\ude80 Use Case 1: VM Provisioning with vCenter<\/h2>\n<p data-start=\"1687\" data-end=\"1924\">Imagine you need to deploy dozens of virtual machines across multiple environments (test\/dev\/prod) with standardized specs, naming conventions, and network configurations. Manually doing this in vSphere is error-prone and time-consuming.<\/p>\n<h3 data-start=\"1926\" data-end=\"1963\">\u2705 Solution: Ansible + vCenter API<\/h3>\n<p data-start=\"1965\" data-end=\"2071\">Using the <strong data-start=\"1975\" data-end=\"1995\">community.vmware<\/strong> Ansible collection, you can automate the full lifecycle of VM provisioning:<\/p>\n<ul data-start=\"2073\" data-end=\"2234\">\n<li data-start=\"2073\" data-end=\"2102\">\n<p data-start=\"2075\" data-end=\"2102\">Create VM from a template<\/p>\n<\/li>\n<li data-start=\"2103\" data-end=\"2135\">\n<p data-start=\"2105\" data-end=\"2135\">Assign CPU, memory, and disk<\/p>\n<\/li>\n<li data-start=\"2136\" data-end=\"2168\">\n<p data-start=\"2138\" data-end=\"2168\">Attach to the proper network<\/p>\n<\/li>\n<li data-start=\"2169\" data-end=\"2234\">\n<p data-start=\"2171\" data-end=\"2234\">Customize hostname and IP via cloud-init or guest customization<\/p>\n<\/li>\n<\/ul>\n<h3 data-start=\"2236\" data-end=\"2267\">\ud83e\udde9 Sample Playbook Snippet:<\/h3>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between h-9 bg-token-sidebar-surface-primary select-none rounded-t-2xl\">yaml<\/div>\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-yaml\"><span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-attr\">name:<\/span> <span class=\"hljs-string\">Deploy<\/span> <span class=\"hljs-string\">VM<\/span> <span class=\"hljs-string\">from<\/span> <span class=\"hljs-string\">template<\/span><br \/>\n  <span class=\"hljs-attr\">hosts:<\/span> <span class=\"hljs-string\">localhost<\/span><br \/>\n  <span class=\"hljs-attr\">gather_facts:<\/span> <span class=\"hljs-literal\">no<\/span><br \/>\n  <span class=\"hljs-attr\">vars:<\/span><br \/>\n    <span class=\"hljs-attr\">vcenter_hostname:<\/span> <span class=\"hljs-string\">\"vcenter.local\"<\/span><br \/>\n    <span class=\"hljs-attr\">username:<\/span> <span class=\"hljs-string\">\"admin@vsphere.local\"<\/span><br \/>\n    <span class=\"hljs-attr\">password:<\/span> <span class=\"hljs-string\">\"yourpass\"<\/span><\/p>\n<p>  <span class=\"hljs-attr\">tasks:<\/span><br \/>\n    <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-attr\">name:<\/span> <span class=\"hljs-string\">Clone<\/span> <span class=\"hljs-string\">VM<\/span><br \/>\n      <span class=\"hljs-attr\">community.vmware.vmware_guest:<\/span><br \/>\n        <span class=\"hljs-attr\">hostname:<\/span> <span class=\"hljs-string\">\"<span class=\"hljs-template-variable\">{{ vcenter_hostname }}<\/span><\/span>\"<br \/>\n        <span class=\"hljs-attr\">username:<\/span> <span class=\"hljs-string\">\"<span class=\"hljs-template-variable\">{{ username }}<\/span><\/span>\"<br \/>\n        <span class=\"hljs-attr\">password:<\/span> <span class=\"hljs-string\">\"<span class=\"hljs-template-variable\">{{ password }}<\/span><\/span>\"<br \/>\n        <span class=\"hljs-attr\">validate_certs:<\/span> <span class=\"hljs-literal\">no<\/span><br \/>\n        <span class=\"hljs-attr\">datacenter:<\/span> <span class=\"hljs-string\">\"DC1\"<\/span><br \/>\n        <span class=\"hljs-attr\">folder:<\/span> <span class=\"hljs-string\">\"\/VMs\/Prod\"<\/span><br \/>\n        <span class=\"hljs-attr\">name:<\/span> <span class=\"hljs-string\">\"webserver01\"<\/span><br \/>\n        <span class=\"hljs-attr\">template:<\/span> <span class=\"hljs-string\">\"Ubuntu20Template\"<\/span><br \/>\n        <span class=\"hljs-attr\">state:<\/span> <span class=\"hljs-string\">poweredon<\/span><br \/>\n        <span class=\"hljs-attr\">networks:<\/span><br \/>\n          <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-attr\">name:<\/span> <span class=\"hljs-string\">\"VM Network\"<\/span><br \/>\n            <span class=\"hljs-attr\">ip:<\/span> <span class=\"hljs-string\">\"192.168.1.50\"<\/span><br \/>\n            <span class=\"hljs-attr\">netmask:<\/span> <span class=\"hljs-string\">\"255.255.255.0\"<\/span><br \/>\n            <span class=\"hljs-attr\">gateway:<\/span> <span class=\"hljs-string\">\"192.168.1.1\"<\/span><br \/>\n<\/code><\/div>\n<\/div>\n<p data-start=\"2963\" data-end=\"3117\">This playbook can be parameterized and run via a <strong data-start=\"3012\" data-end=\"3028\">Job Template<\/strong> in AWX, using a web form to input variables like <code data-start=\"3078\" data-end=\"3087\">VM name<\/code>, <code data-start=\"3089\" data-end=\"3101\">IP address<\/code>, or <code data-start=\"3106\" data-end=\"3116\">template<\/code>.<\/p>\n<hr data-start=\"3119\" data-end=\"3122\" \/>\n<h2 data-start=\"3124\" data-end=\"3161\">\ud83d\udcc5 Scheduling Deployments with AWX<\/h2>\n<p data-start=\"3163\" data-end=\"3258\">With AWX, you can schedule VM provisioning based on events or recurring time slots \u2014 ideal for:<\/p>\n<ul data-start=\"3260\" data-end=\"3360\">\n<li data-start=\"3260\" data-end=\"3290\">\n<p data-start=\"3262\" data-end=\"3290\">Nightly build environments<\/p>\n<\/li>\n<li data-start=\"3291\" data-end=\"3328\">\n<p data-start=\"3293\" data-end=\"3328\">QA environments that reset weekly<\/p>\n<\/li>\n<li data-start=\"3329\" data-end=\"3360\">\n<p data-start=\"3331\" data-end=\"3360\">Disaster recovery testing VMs<\/p>\n<\/li>\n<\/ul>\n<p data-start=\"3362\" data-end=\"3516\">You can also send webhook triggers from your CI\/CD pipeline (e.g., Jenkins or GitLab) to AWX to auto-provision infrastructure during deployment workflows.<\/p>\n<hr data-start=\"3518\" data-end=\"3521\" \/>\n<h2 data-start=\"3523\" data-end=\"3577\">\ud83c\udf10 Use Case 2: Network Device Configuration Backups<\/h2>\n<p data-start=\"3579\" data-end=\"3808\">Backing up your network device configurations regularly is essential for operational continuity and compliance. Manual CLI logins are not scalable \u2014 especially when managing dozens or hundreds of switches, routers, and firewalls.<\/p>\n<h3 data-start=\"3810\" data-end=\"3857\">\u2705 Solution: Ansible + SSH Backup Automation<\/h3>\n<p data-start=\"3859\" data-end=\"4044\">By using <strong data-start=\"3868\" data-end=\"3947\">Ansible with <code data-start=\"3883\" data-end=\"3895\">ios_config<\/code>, <code data-start=\"3897\" data-end=\"3919\">juniper_junos_config<\/code>, or <code data-start=\"3924\" data-end=\"3937\">cli_command<\/code> modules<\/strong>, you can pull config files via SSH from network devices and save them to a centralized location.<\/p>\n<h3 data-start=\"4046\" data-end=\"4070\">\ud83d\udce5 Example Playbook:<\/h3>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between h-9 bg-token-sidebar-surface-primary select-none rounded-t-2xl\">yaml<\/div>\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-yaml\"><span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-attr\">name:<\/span> <span class=\"hljs-string\">Backup<\/span> <span class=\"hljs-string\">Cisco<\/span> <span class=\"hljs-string\">config<\/span><br \/>\n  <span class=\"hljs-attr\">hosts:<\/span> <span class=\"hljs-string\">switches<\/span><br \/>\n  <span class=\"hljs-attr\">gather_facts:<\/span> <span class=\"hljs-literal\">no<\/span><br \/>\n  <span class=\"hljs-attr\">connection:<\/span> <span class=\"hljs-string\">network_cli<\/span><\/p>\n<p>  <span class=\"hljs-attr\">tasks:<\/span><br \/>\n    <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-attr\">name:<\/span> <span class=\"hljs-string\">Collect<\/span> <span class=\"hljs-string\">running<\/span> <span class=\"hljs-string\">config<\/span><br \/>\n      <span class=\"hljs-attr\">ios_command:<\/span><br \/>\n        <span class=\"hljs-attr\">commands:<\/span> <span class=\"hljs-string\">show<\/span> <span class=\"hljs-string\">running-config<\/span><br \/>\n      <span class=\"hljs-attr\">register:<\/span> <span class=\"hljs-string\">config_output<\/span><\/p>\n<p>    <span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-attr\">name:<\/span> <span class=\"hljs-string\">Save<\/span> <span class=\"hljs-string\">to<\/span> <span class=\"hljs-string\">file<\/span><br \/>\n      <span class=\"hljs-attr\">copy:<\/span><br \/>\n        <span class=\"hljs-attr\">content:<\/span> <span class=\"hljs-string\">\"<span class=\"hljs-template-variable\">{{ config_output.stdout[0] }}<\/span><\/span>\"<br \/>\n        <span class=\"hljs-attr\">dest:<\/span> <span class=\"hljs-string\">\"\/backups\/<span class=\"hljs-template-variable\">{{ inventory_hostname }}<\/span><\/span>_config.txt\"<br \/>\n<\/code><\/div>\n<\/div>\n<p data-start=\"4456\" data-end=\"4588\">This playbook can run daily via a <strong data-start=\"4490\" data-end=\"4516\">Scheduled Job Template<\/strong> in AWX, generating timestamped backups for audit and recovery purposes.<\/p>\n<hr data-start=\"4590\" data-end=\"4593\" \/>\n<h2 data-start=\"4595\" data-end=\"4626\">\ud83d\udd10 Security &amp; Access Control<\/h2>\n<p data-start=\"4628\" data-end=\"4711\">AWX enables <strong data-start=\"4640\" data-end=\"4676\">role-based access control (RBAC)<\/strong> for both server and network teams:<\/p>\n<ul data-start=\"4713\" data-end=\"4869\">\n<li data-start=\"4713\" data-end=\"4764\">\n<p data-start=\"4715\" data-end=\"4764\">Network engineers can only run backup playbooks<\/p>\n<\/li>\n<li data-start=\"4765\" data-end=\"4816\">\n<p data-start=\"4767\" data-end=\"4816\">Infrastructure admins can deploy and manage VMs<\/p>\n<\/li>\n<li data-start=\"4817\" data-end=\"4869\">\n<p data-start=\"4819\" data-end=\"4869\">Read-only auditors can view logs and job histories<\/p>\n<\/li>\n<\/ul>\n<p data-start=\"4871\" data-end=\"4955\">It also integrates with LDAP\/Active Directory, so user management stays centralized.<\/p>\n<hr data-start=\"4957\" data-end=\"4960\" \/>\n<h2 data-start=\"4962\" data-end=\"4989\">\ud83d\udcca Logging and Reporting<\/h2>\n<p data-start=\"4991\" data-end=\"5118\">Every job run in AWX generates detailed logs and result data. This makes compliance audits easier and helps debug failed tasks.<\/p>\n<p data-start=\"5120\" data-end=\"5217\">With AWX\u2019s API, you can even forward logs to ELK Stack, Splunk, or Prometheus\/Grafana dashboards.<\/p>\n<hr data-start=\"5219\" data-end=\"5222\" \/>\n<h2 data-start=\"5224\" data-end=\"5250\">\ud83d\udca1 Key Benefits Summary<\/h2>\n<div class=\"_tableContainer_80l1q_1\">\n<div class=\"_tableWrapper_80l1q_14 group flex w-fit flex-col-reverse\" tabindex=\"-1\">\n<table class=\"w-fit min-w-(--thread-content-width)\" data-start=\"5252\" data-end=\"5791\">\n<thead data-start=\"5252\" data-end=\"5329\">\n<tr data-start=\"5252\" data-end=\"5329\">\n<th data-start=\"5252\" data-end=\"5285\" data-col-size=\"sm\">Feature<\/th>\n<th data-start=\"5285\" data-end=\"5329\" data-col-size=\"sm\">Benefit<\/th>\n<\/tr>\n<\/thead>\n<tbody data-start=\"5407\" data-end=\"5791\">\n<tr data-start=\"5407\" data-end=\"5483\">\n<td data-start=\"5407\" data-end=\"5439\" data-col-size=\"sm\">vCenter VM provisioning<\/td>\n<td data-col-size=\"sm\" data-start=\"5439\" data-end=\"5483\">Rapid and consistent server deployment<\/td>\n<\/tr>\n<tr data-start=\"5484\" data-end=\"5560\">\n<td data-start=\"5484\" data-end=\"5516\" data-col-size=\"sm\">Network config backups<\/td>\n<td data-col-size=\"sm\" data-start=\"5516\" data-end=\"5560\">Reliable, centralized archive of devices<\/td>\n<\/tr>\n<tr data-start=\"5561\" data-end=\"5637\">\n<td data-start=\"5561\" data-end=\"5593\" data-col-size=\"sm\">AWX UI &amp; RBAC<\/td>\n<td data-col-size=\"sm\" data-start=\"5593\" data-end=\"5637\">User-friendly control and security<\/td>\n<\/tr>\n<tr data-start=\"5638\" data-end=\"5714\">\n<td data-start=\"5638\" data-end=\"5670\" data-col-size=\"sm\">Git integration<\/td>\n<td data-col-size=\"sm\" data-start=\"5670\" data-end=\"5714\">Version-controlled playbooks<\/td>\n<\/tr>\n<tr data-start=\"5715\" data-end=\"5791\">\n<td data-start=\"5715\" data-end=\"5747\" data-col-size=\"sm\">API\/Webhook support<\/td>\n<td data-col-size=\"sm\" data-start=\"5747\" data-end=\"5791\">Easily integrated with CI\/CD<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"sticky end-(--thread-content-margin) h-0 self-end select-none\">\n<div class=\"absolute end-0 flex items-end\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<hr data-start=\"5793\" data-end=\"5796\" \/>\n<h2 data-start=\"5798\" data-end=\"5814\">\ud83e\udde0 Conclusion<\/h2>\n<p data-start=\"5816\" data-end=\"6145\">Combining <strong data-start=\"5826\" data-end=\"5841\">Ansible AWX<\/strong>, <strong data-start=\"5843\" data-end=\"5854\">vCenter<\/strong>, and <strong data-start=\"5860\" data-end=\"5882\">network automation<\/strong> empowers IT teams to standardize processes, reduce risk, and save countless hours. Whether you&#8217;re deploying 10 servers or backing up 100 switches, these tools make infrastructure automation practical and maintainable \u2014 even within secure on-premise environments.<\/p>\n<p data-start=\"6147\" data-end=\"6372\">At <strong data-start=\"6150\" data-end=\"6163\">Gigansoft<\/strong>, we specialize in helping organizations architect these solutions end-to-end. From AWX deployment to custom playbooks and vSphere integration, our team can automate your infrastructure safely and efficiently.<\/p>\n<hr data-start=\"6374\" data-end=\"6377\" \/>\n<p data-start=\"6379\" data-end=\"6531\">\ud83d\udce9 <strong data-start=\"6382\" data-end=\"6427\">Need help automating your infrastructure?<\/strong><br data-start=\"6427\" data-end=\"6430\" \/>Let Gigansoft build your next on-prem automation stack. Contact us today for a tailored consultation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automating Infrastructure: Server Provisioning with vCenter and Network Backups with Ansible AWX As enterprise IT infrastructure continues to grow in complexity, automation becomes a critical pillar of efficiency, consistency, and&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[10,11,12,13],"class_list":["post-108","post","type-post","status-publish","format-standard","hentry","category-general","tag-ansible","tag-aws","tag-awx","tag-vcenter"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gigansoft.com\/index.php\/wp-json\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gigansoft.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigansoft.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigansoft.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigansoft.com\/index.php\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":1,"href":"https:\/\/www.gigansoft.com\/index.php\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"predecessor-version":[{"id":109,"href":"https:\/\/www.gigansoft.com\/index.php\/wp-json\/wp\/v2\/posts\/108\/revisions\/109"}],"wp:attachment":[{"href":"https:\/\/www.gigansoft.com\/index.php\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigansoft.com\/index.php\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigansoft.com\/index.php\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}