{
    "componentChunkName": "component---src-templates-module-js",
    "path": "/courses/devops/infrustructure-as-code/",
    "result": {"data":{"module":{"frontmatter":{"duration":"3 hours","slug":"/courses/devops/infrustructure-as-code/","title":"Infrastructure as code (IaC)"},"course":{"frontmatter":{"title":"DevOps","slug":"/courses/devops/"}},"slides":[{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/0/","title":"Requirement of automation"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/1/","title":"Example"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/2/","title":"Imperative approach"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/3/","title":"Declarative approach"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/4/","title":"Implementation in DevOps"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/5/","title":"Immutable & mutable infrastructure"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/6/","title":"Managing development virtual environment with Vagrant"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/7/","title":"Vagrant workflow"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/8/","title":"Vagrant components"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/9/","title":"Vagrant basic commands"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/10/","title":"Vagrant Provisioners"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/11/","title":"Provisioning with Ansible"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/12/","title":"Ansible components"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/13/","title":"Example Ansible project tree"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/14/","title":"Ansible variables"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/15/","title":"Cloud provisioning with Terraform"}},{"frontmatter":{"slug":"/courses/devops/infrustructure-as-code/slides/16/","title":"Resources"}}],"parent":{"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"duration\": \"3 hours\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"Infrastructure as code (IaC) is a type of IT setup wherein developers or operations teams automatically manage and provision the technology stack for an application through software, rather than using a manual process to configure discrete hardware devices and operating systems.\"), mdx(\"h2\", null, \"Requirement of automation\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Increasingly crucial to automate\", mdx(\"br\", {\n    parentName: \"li\"\n  }), \"Applications can be deployed up to hundreds of times per day.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Infrastructure is fleeting\", mdx(\"br\", {\n    parentName: \"li\"\n  }), \"It can be provisioned or de-provisioned in response to load.\")), mdx(\"h2\", null, \"Example\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"An application on a public cloud:\")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"build on Kubernetes\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"bring on a VM (some legacy)\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"and add VPC to connect them\")), mdx(\"ol\", {\n    \"start\": 2\n  }, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Then you need exactly the same test environment\")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"manual repeating documented steps may contain human-factor errors \")), mdx(\"h2\", null, \"Imperative approach\"), mdx(\"p\", null, \"Intuitive, step-by-step way.\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Example:\")), mdx(\"p\", null, \"CLI along with a bash script like:   \"), mdx(\"div\", {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"bash\"\n  }, mdx(\"pre\", {\n    parentName: \"div\",\n    \"className\": \"language-bash\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"cli create vm\\ncli configure vm\\n\", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"..\"), \".\\ncli create vpc\\ncli configure vpc\\n\", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"..\"), \".\\ncli create db\\ncli configure db\\n\", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"..\"), \".\"))), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Disadvantages:\")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"When you need to scale it up or down you need to write custom scripts.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Doesn't scale well.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"If you run multiple times, it will create each time.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"You have to add error handling when one of the steps fails halfway.\")), mdx(\"h2\", null, \"Declarative approach\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Define the final state of your infrastructure.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"It lets the provider handle the rest.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Managed through simple config maps.\")), mdx(\"div\", {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"bash\"\n  }, mdx(\"pre\", {\n    parentName: \"div\",\n    \"className\": \"language-bash\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"vm:\\n  config: \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"..\"), \".\\nvpc:\\n  config: \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"..\"), \".\\ndb:\\n  config: \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"..\"), \".\\n\", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"..\"), \".\"))), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Advantages:\")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"No matter how many times you run provisioning you end up with the same infrastructure. Example: run it later to ensure the infrastructure hasn't changed\")), mdx(\"h2\", null, \"Implementation in DevOps\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Example:\"), \" \"), mdx(\"p\", null, \"Perfect agile DevOps flow:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"-> write code\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"-> test\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"-> deploy to production\")), mdx(\"p\", null, \"With a legacy infrastructure:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"you have to open a ticket when you need a new VM\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"that holds you back\")), mdx(\"p\", null, \"With IaC (the best approach):\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"you treat the infrastructure with the same quality as you treat your code\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"versioning with Git\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"tracking changes\")), mdx(\"h2\", null, \"Immutable & mutable infrastructure\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Example:\")), mdx(\"p\", null, \"You add a database to your infrastructure: VM, VPC + database. Scale it 1000 times.\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Mutable approach\"), \" - environment (configuration) drift (move the infrastructure from V1 to V2 with a mutation \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"custom script\"), \"):\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"99% it is working, but 1% failing in a limbo state.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Existing environment no longer matches what we have in our automation.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"To debug you would have to:\", mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"wipe out the entire environment\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"redeploy V1\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"run those scripts\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"When moving to scale it becomes incredibly hard to maintain.\")), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Immutable approach\"), \" - a new environment alongside the old one:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"When they are both working you bring down the older version.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"It is expensive (V1 and V2 are running at the same time).\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"But it's a best practice to ensure that your infrastructure can scale.\")), mdx(\"h2\", null, \"Managing development virtual environment with Vagrant\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Vagrant\"), \" - a tool for building and managing virtual machine environments in a single workflow.\"), mdx(\"p\", null, \"Benefits:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"automate prod-like environments\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"easy to configure\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"portable\")), mdx(\"h2\", null, \"Vagrant workflow\"), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"650px\"\n    }\n  }, \"\\n      \", mdx(\"a\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/e8226c8431dbf6b65263b917a55e7c84/0b9e0/vagrant-workflow.jpg\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }, \"\\n    \", mdx(\"span\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"76.07361963190185%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAPABQDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAIDBAX/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAAB2x0IiyJ//8QAGBAAAwEBAAAAAAAAAAAAAAAAAAECMRD/2gAIAQEAAQUC0lCu+Th//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAGBAAAgMAAAAAAAAAAAAAAAAAAAEgISL/2gAIAQEABj8CKHiH/8QAGxAAAgMAAwAAAAAAAAAAAAAAAREAIVExQXH/2gAIAQEAAT8hCc2OlsAAqeRtgo7Dr4jHFxT/2gAMAwEAAgADAAAAEJT/AP/EABURAQEAAAAAAAAAAAAAAAAAAAAR/9oACAEDAQE/EEf/xAAWEQEBAQAAAAAAAAAAAAAAAAAAEWH/2gAIAQIBAT8QXH//xAAbEAEBAAMBAQEAAAAAAAAAAAABEQAhQWFRcf/aAAgBAQABPxDcQhUuMoBQ1RB83iQ2EGSmFGUAacf3NHVlM2vfcj4Z/9k=')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), \"\\n  \", mdx(\"img\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Vagrant workflow\",\n    \"title\": \"Vagrant workflow\",\n    \"src\": \"/static/e8226c8431dbf6b65263b917a55e7c84/6aca1/vagrant-workflow.jpg\",\n    \"srcSet\": [\"/static/e8226c8431dbf6b65263b917a55e7c84/d2f63/vagrant-workflow.jpg 163w\", \"/static/e8226c8431dbf6b65263b917a55e7c84/c989d/vagrant-workflow.jpg 325w\", \"/static/e8226c8431dbf6b65263b917a55e7c84/6aca1/vagrant-workflow.jpg 650w\", \"/static/e8226c8431dbf6b65263b917a55e7c84/0b9e0/vagrant-workflow.jpg 864w\"],\n    \"sizes\": \"(max-width: 650px) 100vw, 650px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\"\n  }), \"\\n  \"), \"\\n    \")), mdx(\"h2\", null, \"Vagrant components\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"host\"), \" and \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"guest\"), \" machines \"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Vagrantfile\"), \" - configuration (on Ruby)\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Box\"), \" - OS and version\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Providers\"), \" - VM hypervisor (VirtualBox, VMware, libvirt)\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Provisioners\"), \":\", mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"shell\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Ansible\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Chef\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Puppet\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"...\")))), mdx(\"h2\", null, \"Vagrant basic commands\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"code\", {\n    parentName: \"li\",\n    \"className\": \"language-text\"\n  }, \"vagrant up\"), \" - Start and provision VM\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"code\", {\n    parentName: \"li\",\n    \"className\": \"language-text\"\n  }, \"vagrant destroy\"), \" - Destroy VMs\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"code\", {\n    parentName: \"li\",\n    \"className\": \"language-text\"\n  }, \"vagrant status\"), \" - Check VMs status\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"code\", {\n    parentName: \"li\",\n    \"className\": \"language-text\"\n  }, \"vagrant ssh <VM_NAME>\"), \" - SSH as the vagrant user\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"code\", {\n    parentName: \"li\",\n    \"className\": \"language-text\"\n  }, \"vagrant halt\"), \" - stop the VMs\")), mdx(\"h2\", null, \"Vagrant Provisioners\"), mdx(\"p\", null, \"Provisioners in Vagrant allow you to automatically install software, alter configurations, and more on the machine as part of the \", mdx(\"code\", {\n    parentName: \"p\",\n    \"className\": \"language-text\"\n  }, \"vagrant up\"), \" process.\"), mdx(\"p\", null, mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.vagrantup.com/docs/provisioning\"\n  }, \"Read more about Vagrant Provisioning\")), mdx(\"h2\", null, \"Provisioning with Ansible\"), mdx(\"p\", null, \"Ansible is an \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"automation engine\"), \" that automates:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"cloud provisioning\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"configuration management\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"application deployment\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"intra-service orchestration\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"many other IT needs ...\")), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Advantages:\")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"no-agent to install on machines, SSH only\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"write configuration (playbooks) on YAML - easy to learn\")), mdx(\"h2\", null, \"Ansible components\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Module\"), \" - units of code providing a narrow functionality (e.g. the \", mdx(\"code\", {\n    parentName: \"li\",\n    \"className\": \"language-text\"\n  }, \"yum\"), \" module installs packages using the yum package manager).\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Task\"), \" - execution of one module with a set of arguments.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Playbook\"), \" - set of tasks in YAML.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Role\"), \" - set of playbooks to be run on a group of hosts.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Host\"), \" - a machine that Ansible will configure through SSH.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Inventory\"), \" - definition of the hosts and variables to be used in the playbooks.\")), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"650px\"\n    }\n  }, \"\\n      \", mdx(\"a\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/645e9cdaf5d3d19f3e2ae47bb7f87e00/b2cd5/ansible.jpg\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }, \"\\n    \", mdx(\"span\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"70.5521472392638%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAOABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAAEF/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/2gAMAwEAAhADEAAAAdyqFJ//xAAXEAEAAwAAAAAAAAAAAAAAAAABACAx/9oACAEBAAEFAnYU/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAFRABAQAAAAAAAAAAAAAAAAAAEAH/2gAIAQEABj8Ca//EABkQAQEBAQEBAAAAAAAAAAAAAAEAESExUf/aAAgBAQABPyFITuXstLFepPkGF//aAAwDAQACAAMAAAAQ0x//xAAWEQEBAQAAAAAAAAAAAAAAAAAAAXH/2gAIAQMBAT8Q1H//xAAVEQEBAAAAAAAAAAAAAAAAAAABEP/aAAgBAgEBPxBn/8QAGRABAAMBAQAAAAAAAAAAAAAAAQARITFh/9oACAEBAAE/EDMJdRwjapXNKnYbRpYksDVRK4GYFr6z/9k=')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), \"\\n  \", mdx(\"img\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Ansible components\",\n    \"title\": \"Ansible components\",\n    \"src\": \"/static/645e9cdaf5d3d19f3e2ae47bb7f87e00/6aca1/ansible.jpg\",\n    \"srcSet\": [\"/static/645e9cdaf5d3d19f3e2ae47bb7f87e00/d2f63/ansible.jpg 163w\", \"/static/645e9cdaf5d3d19f3e2ae47bb7f87e00/c989d/ansible.jpg 325w\", \"/static/645e9cdaf5d3d19f3e2ae47bb7f87e00/6aca1/ansible.jpg 650w\", \"/static/645e9cdaf5d3d19f3e2ae47bb7f87e00/b2cd5/ansible.jpg 828w\"],\n    \"sizes\": \"(max-width: 650px) 100vw, 650px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\"\n  }), \"\\n  \"), \"\\n    \")), mdx(\"h2\", null, \"Example Ansible project tree\"), mdx(\"div\", {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"text\"\n  }, mdx(\"pre\", {\n    parentName: \"div\",\n    \"className\": \"language-text\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-text\"\n  }, \"run.yml\\nroles/\\n  common/\\n    tasks/\\n    handlers/\\n    files/\\n    templates/\\n    vars/\\n    defaults/\\n    meta/\\n  webservers/\\n    tasks/\\n    defaults/\\n    meta/\"))), mdx(\"h2\", null, \"Ansible variables\"), mdx(\"p\", null, \"Ansible variables:\"), mdx(\"div\", {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"yaml\"\n  }, mdx(\"pre\", {\n    parentName: \"div\",\n    \"className\": \"language-yaml\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-yaml\"\n  }, mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token key atrule\"\n  }, \"postgres\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \":\"), \"\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token key atrule\"\n  }, \"host\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \":\"), \" psql.toto.com\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token key atrule\"\n  }, \"port\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \":\"), \" \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token number\"\n  }, \"5432\"), \"\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token key atrule\"\n  }, \"timezone\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \":\"), \" Europe/Paris\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token key atrule\"\n  }, \"databases\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \":\"), \"\\n    \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"-\"), \" toto\\n    \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"-\"), \" tata\"))), mdx(\"p\", null, \"Ansible debug message:\"), mdx(\"div\", {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"yaml\"\n  }, mdx(\"pre\", {\n    parentName: \"div\",\n    \"className\": \"language-yaml\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-yaml\"\n  }, mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"-\"), \" \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token key atrule\"\n  }, \"debug\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \":\"), \"\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token key atrule\"\n  }, \"msg\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \":\"), \" \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token string\"\n  }, \"\\\"{{postgres.host}}: {{postgres.port}}\\\"\")))), mdx(\"p\", null, \"Output:\"), mdx(\"div\", {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"text\"\n  }, mdx(\"pre\", {\n    parentName: \"div\",\n    \"className\": \"language-text\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-text\"\n  }, \"ok: [server] => { \\n  \\\"msg\\\": \\\"psql.toto.com:5432\\\" \\n}\"))), mdx(\"p\", null, mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://docs.ansible.com/ansible/latest/user_guide/playbooks_templating.html\"\n  }, \"Read more\"), \" about Jinja2 templating.\"), mdx(\"h2\", null, \"Cloud provisioning with Terraform\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"By HashiCorp (same company as Vagrant)\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Manage all kinds of Cloud objects:\", mdx(\"ul\", {\n    parentName: \"li\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Machines/Containers\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Networks\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Services\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Clusters\"))), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Work with all Cloud providers: Azure, AWS, GCP, Alibaba Cloud ...\")), mdx(\"h2\", null, \"Resources\"), mdx(\"p\", null, \"References:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://www.vagrantup.com/docs\"\n  }, \"Vagrant Documentation\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://www.ansible.com/overview/how-ansible-works\"\n  }, \"How Ansible Works\"))), mdx(\"p\", null, \"Videos:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://www.youtube.com/watch?v=zWw2wuiKd5o\"\n  }, \"What is Infrastructure as Code?\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://www.youtube.com/watch?v=tWR1KXgEYxE\"\n  }, \"What is Ansible In Under 3 Minutes\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://www.youtube.com/watch?v=4xThcqDfbSA&list=PL4CwCXuy76Fe4Lll2ksYXGtupJNxpiBVV&index=2\"\n  }, \"002 Installing Ansible\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://www.youtube.com/watch?v=St__HLMZ8qQ\"\n  }, \"How Ansible works\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://www.ansible.com/resources/videos/quick-start-video\"\n  }, \"Ansible: quick start video\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"https://www.youtube.com/watch?v=prtO-Ox8LW8\"\n  }, \"D\\xE9couvrir Ansible : outils d'orchestration et d'automatisation - ep01\"))));\n}\n;\nMDXContent.isMDXComponent = true;"}}},"pageContext":{}},
    "staticQueryHashes": []}