{"id":54689,"date":"2020-04-01T09:40:11","date_gmt":"2020-04-01T14:40:11","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=54689"},"modified":"2023-09-21T12:14:39","modified_gmt":"2023-09-21T16:14:39","slug":"getting-started-with-ansible","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/","title":{"rendered":"Getting Started with Ansible"},"content":{"rendered":"\n<p>Do you find yourself configuring many servers or hosting plans with similar sets of software packages, configuration files, and deploying full software stacks? Although <a href=\"https:\/\/www.inmotionhosting.com\/ansible\"><strong>Ansible<\/strong><\/a> is the most widely used automation engine, there are a number of configuration and orchestration solutions available. Read through this article to learn about getting started with Ansible.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is Ansible?<\/strong><\/h2>\n\n\n\n<p>Ansible is a simple, yet powerful automation engine that allows you to define and manage complex environments by defining your infrastructure in templates that reflect your workflow. By doing so, this provides greater velocity in terms of completing tasks without requiring special development skills, all in a human-readable format.<\/p>\n\n\n\n<p>A really handy feature is that it doesn\u2019t require any special configuration to run tasks against a remote host. All you need is SSH access and Python to run a playbook! Next, we\u2019ll review more about how this works in practice.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>General Ansible Terminology<\/strong><\/h3>\n\n\n\n<p>Before we dive into Ansible, it is best to learn about these terms that are common to all uses of Ansible and lay the foundation on some of the best practices for using Ansible.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table class=\"table table-bordered table-striped\"><tbody><tr><td><strong>Term<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td><strong>Control Node<\/strong><\/td><td>The host on which you use Ansible to execute tasks on the targeted nodes<\/td><\/tr><tr><td><strong>Managed Node<\/strong><\/td><td>A host that is configured by the Ansible control node<\/td><\/tr><tr><td><br><strong>Host Inventory<\/strong><\/td><td>A list of nodes that Ansible will target. The <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/add-hosts-to-ansible-inventory\/\">Ansible Inventory<\/a> file lists all external hosts you\u2019ll deploy to and their assigned groups.<\/td><\/tr><tr><td><strong>Playbook<\/strong><\/td><td>A set of repeatable tasks usually built into a collection of roles for more complex configurations.<\/td><\/tr><tr><td><strong>Role<\/strong><\/td><td>A set of tasks and variables usually geared to accomplish a specific task such as installing and configuring a service<\/td><\/tr><tr><td><br><strong>Idempotency<\/strong><\/td><td>A task that can be run multiple times and produce the same result<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How does Ansible Work?<\/strong><\/h3>\n\n\n\n<p>Ansible connects to nodes defined in your inventory and sends a small program in the form of an \u201cAnsible Module\u201d to perform some desired actions. These modules are executed via SSH by default, and are removed once they have finished running. The end result of <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/create-an-ansible-playbook\/\">creating a playbook<\/a> is that the actions that are performed are predictable and reusable, meaning running a playbook more than once will result in only required changes being completed.<\/p>\n\n\n\n<p>Compared to other configuration management platforms or tools, Ansible does not require you to dedicate a server for storing or running modules. You won\u2019t have to configure or run a daemon, or maintain a database. This is referred to Ansible being \u201cAgent-less\u201d compared to other configuration management ecosystems.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What Should I Know Before Trying Ansible?<\/strong><\/h3>\n\n\n\n<p>Ansible is a very simple IT automation platform and very easy to learn, but having a knowledge of these items below will greatly help.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Linux<\/strong><\/h4>\n\n\n\n<p>Since Ansible is meant to automate tasks on Linux servers, general systems administrative understanding of Linux will greatly help your success.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>SSH<\/strong><\/h4>\n\n\n\n<p>Ansible requires SSH to connect to the servers you want to perform tasks on. Understanding how SSH work and how to gain SSH access to your nodes is necessary to be able to use Ansible.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>YAML<\/strong><\/h4>\n\n\n\n<p>Ansible Playbooks and Roles are written in YAML. This is a human-readable language that is commonly used in configuration files or in applications that store and transmit data. For a basic overview, read the official Ansible documentation on YAML.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Install Ansible<\/strong><\/h2>\n\n\n\n<p>There are many ways you can install Ansible depending on your preferred workflow and operating system.<\/p>\n\n\n\n<p>We offer an <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-ansible-control-node\/\"><strong>InMotion Ansible Control Node<\/strong><\/a> free with our Cloud Server and <a href=\"https:\/\/www.inmotionhosting.com\/bare-metal-servers\">Dedicated Bare Metal Servers<\/a> that is pre-built with Ansible that you can use to deploy your hosts from. Or you can also <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/install-ansible\/\">install Ansible manually<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you find yourself configuring many servers or hosting plans with similar sets of software packages, configuration files, and deploying full software stacks? Although Ansible is the most widely used automation engine, there are a number of configuration and orchestration solutions available. Read through this article to learn about getting started with Ansible. What is<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/\"> Read More ><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4349],"tags":[],"class_list":["post-54689","post","type-post","status-publish","format-standard","hentry","category-ansible"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Getting Started with Ansible | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Learn about getting started with Ansible. You will learn general terminology, how it works, concerns before using Ansible, and how to install it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting Started with Ansible | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Learn about getting started with Ansible. You will learn general terminology, how it works, concerns before using Ansible, and how to install it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-01T14:40:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-21T16:14:39+00:00\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b\"},\"headline\":\"Getting Started with Ansible\",\"datePublished\":\"2020-04-01T14:40:11+00:00\",\"dateModified\":\"2023-09-21T16:14:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/\"},\"wordCount\":611,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Ansible Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/\",\"name\":\"Getting Started with Ansible | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2020-04-01T14:40:11+00:00\",\"dateModified\":\"2023-09-21T16:14:39+00:00\",\"description\":\"Learn about getting started with Ansible. You will learn general terminology, how it works, concerns before using Ansible, and how to install it.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting Started with Ansible\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/john-paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Getting Started with Ansible | InMotion Hosting","description":"Learn about getting started with Ansible. You will learn general terminology, how it works, concerns before using Ansible, and how to install it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/","og_locale":"en_US","og_type":"article","og_title":"Getting Started with Ansible | InMotion Hosting","og_description":"Learn about getting started with Ansible. You will learn general terminology, how it works, concerns before using Ansible, and how to install it.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2020-04-01T14:40:11+00:00","article_modified_time":"2023-09-21T16:14:39+00:00","author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b"},"headline":"Getting Started with Ansible","datePublished":"2020-04-01T14:40:11+00:00","dateModified":"2023-09-21T16:14:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/"},"wordCount":611,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Ansible Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/","name":"Getting Started with Ansible | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2020-04-01T14:40:11+00:00","dateModified":"2023-09-21T16:14:39+00:00","description":"Learn about getting started with Ansible. You will learn general terminology, how it works, concerns before using Ansible, and how to install it.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/ansible\/getting-started-with-ansible\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Getting Started with Ansible"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/john-paul\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/54689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=54689"}],"version-history":[{"count":14,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/54689\/revisions"}],"predecessor-version":[{"id":106819,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/54689\/revisions\/106819"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=54689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=54689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=54689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}