{"id":6456,"date":"2020-11-17T15:23:49","date_gmt":"2020-11-17T14:23:49","guid":{"rendered":"https:\/\/anexia.com\/stagingblog\/?p=6456"},"modified":"2022-04-20T13:16:42","modified_gmt":"2022-04-20T11:16:42","slug":"automation-at-anexia-with-ansible","status":"publish","type":"post","link":"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/","title":{"rendered":"Automation at Anexia with Ansible"},"content":{"rendered":"<p>Automation of the IT environment has been a hot topic for many years now. It is the prerequisite to solve complex IT problems. Due to its <a href=\"https:\/\/anexia.com\/en\/hosting-it-solutions\/infrastructure\/worldwide\" target=\"_blank\" rel=\"noopener noreferrer\">global locations<\/a> and diverse customers, Anexia has special requirements for the <strong>automation of its IT landscape<\/strong>. A single tool may never fulfill all these requirements, and therefore, it rather is an interaction of multiple systems.<\/p>\n<p>One of the basic tools for Anexia is <strong>Ansible<\/strong>. Together with the <a href=\"https:\/\/www.anexia-engine.com\/en\/home\" target=\"_blank\" rel=\"noopener noreferrer\">Anexia Engine<\/a>, our customer portal and central data interface, it covers most of the requirements. In this blog post we take you on a journey from the decision to use Ansible, our challenges and up to the integration into our existing infrastructure.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>Why Ansible as automation framework?<\/h3>\n<p>Ansible is &#8211; besides Puppet, Chef or SaltStack &#8211; one of the best-known automation frameworks for existing IT systems. While Puppet and SaltStack are declarative systems, Ansible and Chef are <strong>imperative<\/strong> tools.<\/p>\n<p>A declarative system describes the desired state explicitly, while imperative systems describe the nominal condition implicitly. This results from individual steps that must be taken to get from the actual state to the desired state.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Deklarativ-Imperativ_EN-297x300.png\" alt=\"Declarative vs. Imperative Systems\" width=\"594\" height=\"600\" class=\"alignnone size-medium wp-image-5300\" srcset=\"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Deklarativ-Imperativ_EN-297x300.png 297w, https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Deklarativ-Imperativ_EN-1012x1024.png 1012w, https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Deklarativ-Imperativ_EN-768x777.png 768w, https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Deklarativ-Imperativ_EN-1518x1536.png 1518w, https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Deklarativ-Imperativ_EN.png 1800w\" sizes=\"(max-width: 594px) 100vw, 594px\" \/><\/p>\n<p>&nbsp;<br \/>\nImperative systems have <strong>advantages<\/strong> when it comes to the <strong>chronology of cross-system tasks<\/strong>. In such cases a new state on a system can only be taken if another system has reached a certain state. As intermediate states are described explicitly, they can be easily used for synchronization of different systems.<\/p>\n<p>Apart from the advantage of imperative states, there have been other decisive factors for choosing Ansible at Anexia:<\/p>\n<li><strong>Agentless<\/strong>. No agent has to run on the target system to communicate with the controller.<\/li>\n<li><strong>Different target platforms<\/strong> such as Linux, Windows, Junos, FortiOS, VMware<\/li>\n<li><strong>Clarity<\/strong>. Playbooks and roles are structured by YAML and are therefore clear and easily to learn.<\/li>\n<p>&nbsp;<\/p>\n<h3>Challenges by using Ansible<\/h3>\n<p>The often-mentioned easy entry with Ansible and the clarity of the playbook also have a flip side: There\u2019s more than one way to solve a problem. While Puppet offers a strict framework to develop a manifest with its DSL (Domain Specific Language), users of Ansible have many options to develop a <strong>playbook<\/strong>. Any developer who has looked for a role via Galaxy may agree with the following statement:<\/p>\n<p><em>&#8222;It does what it should do. But it does not fit perfectly.&#8220;<\/em><\/p>\n<p>To ensure constant <strong>quality and reusability of playbooks<\/strong> and roles, a lot of additional effort has to be done in advance. This includes:<\/p>\n<li>Definition of style and naming guides<\/li>\n<li>Development of templates for playbooks\/roles and their documentation<\/li>\n<li>Development of a CI testing process<\/li>\n<p>&nbsp;<br \/>\nThe <strong>automated testing process<\/strong> is particularly invaluable for continuous quality assurance. On the one hand they support the maintenance of roles and playbooks over the complete life cycle. On the other hand, they can be used as a problem management tool to reproduce incidents.<\/p>\n<p>Anexia uses <strong>molecule<\/strong> together with Docker and Vagrant to enable automated tests for the Gitlab CI pipelines. We will cover this topic in more detail in an upcoming blog post.<\/p>\n<p>&nbsp;<\/p>\n<h3>Integration of Ansible and the Anexia Engine<\/h3>\n<p>A major challenge with Ansible is the development of inventories &#8211; a list of hosts &#8211; that must be managed. Agent-based systems solve this problem by using, well, agents. But that\u2019s not possible with Ansible.<\/p>\n<p>Anexia uses the <strong>Engine<\/strong> &#8211; to be specific, <strong>the CMDB modul<\/strong>e &#8211; to solve this problem. The CMDB (Configuration Management DataBase) module catalogs all resources and manages the relationships between them. By using the CMDB it is possible, for example, to know that a VM is running on hypervisor X, located at location Y.<\/p>\n<p>When a system, VM, hypervisor, or switch is activated at Anexia, the Engine records it. With an <strong>inventory script<\/strong> it is possible to retrieve this data before starting a run. An updated list of all systems is available at all time.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Engine_EN-300x118.png\" alt=\"Ansible and Anexia Engine\" width=\"600\" height=\"236\" class=\"alignnone size-medium wp-image-5302\" srcset=\"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Engine_EN-300x118.png 300w, https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Engine_EN-1024x402.png 1024w, https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Engine_EN-768x302.png 768w, https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Engine_EN-1536x603.png 1536w, https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible-Engine_EN.png 1800w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>As a first step, Anexia made its internal systems accessible by using the Engine with a separate inventory. There a basic configuration (users, packages etc.) is defined. A similar project is underway for the hypervisor infrastructure. The goal is to additionally reduce the deployment time to define the basic configuration.<\/p>\n<p>&nbsp;<\/p>\n<h3>Plans with Ansible at Anexia<\/h3>\n<p>In the future, the integration of Engine and Ansible will be further expanded. This will enable Anexia to integrate more services into the Engine and offer customers more self-service.<\/p>\n<p>In this blog we will keep you updated on the progress of automation at Anexia. In the meantime inform yourself about our <a href=\"https:\/\/www.anexia-engine.com\/en\/home\" target=\"_blank\" rel=\"noopener noreferrer\">Anexia Engine<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automation of the IT environment has been a hot topic for many years now. It is the prerequisite to solve complex IT problems. Anexia uses amongst other Ansible for automation.<\/p>\n","protected":false},"author":43,"featured_media":5298,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1129],"tags":[1432,1329,1327],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Automation at Anexia with Ansible - ANEXIA Blog<\/title>\n<meta name=\"description\" content=\"Automatisierung ist ein wichtiges Thema, um komplexe Probleme in der IT zu l\u00f6sen. Anexia nutzt unter anderem Ansible zur Automatisierung.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automation at Anexia with Ansible - ANEXIA Blog\" \/>\n<meta property=\"og:description\" content=\"Automatisierung ist ein wichtiges Thema, um komplexe Probleme in der IT zu l\u00f6sen. Anexia nutzt unter anderem Ansible zur Automatisierung.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/\" \/>\n<meta property=\"og:site_name\" content=\"ANEXIA Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/anexiagmbh\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-17T14:23:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-20T11:16:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible_Teaser.png\" \/>\n\t<meta property=\"og:image:width\" content=\"672\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Stefan Jakobs\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@_ANEXIA\" \/>\n<meta name=\"twitter:site\" content=\"@_ANEXIA\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stefan Jakobs\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"4\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/\",\"url\":\"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/\",\"name\":\"Automation at Anexia with Ansible - ANEXIA Blog\",\"isPartOf\":{\"@id\":\"https:\/\/anexia.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible_Teaser.png\",\"datePublished\":\"2020-11-17T14:23:49+00:00\",\"dateModified\":\"2022-04-20T11:16:42+00:00\",\"author\":{\"@id\":\"https:\/\/anexia.com\/blog\/#\/schema\/person\/3d496f1e272a1a8d5d6d8b1f8a633795\"},\"description\":\"Automatisierung ist ein wichtiges Thema, um komplexe Probleme in der IT zu l\u00f6sen. Anexia nutzt unter anderem Ansible zur Automatisierung.\",\"breadcrumb\":{\"@id\":\"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/#primaryimage\",\"url\":\"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible_Teaser.png\",\"contentUrl\":\"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible_Teaser.png\",\"width\":672,\"height\":372,\"caption\":\"Automatisierung mit Ansible bei Anexia\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/anexia.com\/blog\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Automation at Anexia with Ansible\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/anexia.com\/blog\/#website\",\"url\":\"https:\/\/anexia.com\/blog\/\",\"name\":\"ANEXIA Blog\",\"description\":\"[:de] ANEXIA Blog - Technischen Themen, Anexia News und Insights [:]\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/anexia.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/anexia.com\/blog\/#\/schema\/person\/3d496f1e272a1a8d5d6d8b1f8a633795\",\"name\":\"Stefan Jakobs\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/anexia.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d1f97c2c232c85f870fe437e19cbbfe2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d1f97c2c232c85f870fe437e19cbbfe2?s=96&d=mm&r=g\",\"caption\":\"Stefan Jakobs\"},\"url\":\"https:\/\/anexia.com\/blog\/author\/sjakobs\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Automation at Anexia with Ansible - ANEXIA Blog","description":"Automatisierung ist ein wichtiges Thema, um komplexe Probleme in der IT zu l\u00f6sen. Anexia nutzt unter anderem Ansible zur Automatisierung.","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:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/","og_locale":"de_DE","og_type":"article","og_title":"Automation at Anexia with Ansible - ANEXIA Blog","og_description":"Automatisierung ist ein wichtiges Thema, um komplexe Probleme in der IT zu l\u00f6sen. Anexia nutzt unter anderem Ansible zur Automatisierung.","og_url":"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/","og_site_name":"ANEXIA Blog","article_publisher":"https:\/\/www.facebook.com\/anexiagmbh\/","article_published_time":"2020-11-17T14:23:49+00:00","article_modified_time":"2022-04-20T11:16:42+00:00","og_image":[{"width":672,"height":372,"url":"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible_Teaser.png","type":"image\/png"}],"author":"Stefan Jakobs","twitter_card":"summary_large_image","twitter_creator":"@_ANEXIA","twitter_site":"@_ANEXIA","twitter_misc":{"Verfasst von":"Stefan Jakobs","Gesch\u00e4tzte Lesezeit":"4\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/","url":"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/","name":"Automation at Anexia with Ansible - ANEXIA Blog","isPartOf":{"@id":"https:\/\/anexia.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/#primaryimage"},"image":{"@id":"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/#primaryimage"},"thumbnailUrl":"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible_Teaser.png","datePublished":"2020-11-17T14:23:49+00:00","dateModified":"2022-04-20T11:16:42+00:00","author":{"@id":"https:\/\/anexia.com\/blog\/#\/schema\/person\/3d496f1e272a1a8d5d6d8b1f8a633795"},"description":"Automatisierung ist ein wichtiges Thema, um komplexe Probleme in der IT zu l\u00f6sen. Anexia nutzt unter anderem Ansible zur Automatisierung.","breadcrumb":{"@id":"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/#primaryimage","url":"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible_Teaser.png","contentUrl":"https:\/\/anexia.com\/blog\/wp-content\/uploads\/2020\/11\/Blog_Ansible_Teaser.png","width":672,"height":372,"caption":"Automatisierung mit Ansible bei Anexia"},{"@type":"BreadcrumbList","@id":"https:\/\/anexia.com\/blog\/en\/automation-at-anexia-with-ansible\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/anexia.com\/blog\/de\/"},{"@type":"ListItem","position":2,"name":"Automation at Anexia with Ansible"}]},{"@type":"WebSite","@id":"https:\/\/anexia.com\/blog\/#website","url":"https:\/\/anexia.com\/blog\/","name":"ANEXIA Blog","description":"[:de] ANEXIA Blog - Technischen Themen, Anexia News und Insights [:]","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/anexia.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de"},{"@type":"Person","@id":"https:\/\/anexia.com\/blog\/#\/schema\/person\/3d496f1e272a1a8d5d6d8b1f8a633795","name":"Stefan Jakobs","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/anexia.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d1f97c2c232c85f870fe437e19cbbfe2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d1f97c2c232c85f870fe437e19cbbfe2?s=96&d=mm&r=g","caption":"Stefan Jakobs"},"url":"https:\/\/anexia.com\/blog\/author\/sjakobs\/"}]}},"lang":"en","translations":{"en":6456,"de":5294},"amp_enabled":true,"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/anexia.com\/blog\/wp-json\/wp\/v2\/posts\/6456"}],"collection":[{"href":"https:\/\/anexia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anexia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anexia.com\/blog\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/anexia.com\/blog\/wp-json\/wp\/v2\/comments?post=6456"}],"version-history":[{"count":1,"href":"https:\/\/anexia.com\/blog\/wp-json\/wp\/v2\/posts\/6456\/revisions"}],"predecessor-version":[{"id":6459,"href":"https:\/\/anexia.com\/blog\/wp-json\/wp\/v2\/posts\/6456\/revisions\/6459"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/anexia.com\/blog\/wp-json\/wp\/v2\/media\/5298"}],"wp:attachment":[{"href":"https:\/\/anexia.com\/blog\/wp-json\/wp\/v2\/media?parent=6456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anexia.com\/blog\/wp-json\/wp\/v2\/categories?post=6456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anexia.com\/blog\/wp-json\/wp\/v2\/tags?post=6456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}