{"id":16697,"date":"2021-09-27T09:51:48","date_gmt":"2021-09-27T07:51:48","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/"},"modified":"2021-09-27T09:51:48","modified_gmt":"2021-09-27T07:51:48","slug":"scanning-ansible-code-with-ansible-lint","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/","title":{"rendered":"Scanning Ansible code with Ansible Lint"},"content":{"rendered":"<h3>Introduction<\/h3>\n<p>It&#8217;s always good to learn something new. But doing it the right way from the very beginning is even better.<br \/>\nI recently started to work with Ansible and after creating a few roles, I quickly realized that there were many different ways to achieve the same goal.<br \/>\nSome examples are :<br \/>\n&#8211; The use of the Shell module vs the Command module<br \/>\n&#8211; The use of Loop vs With_*<br \/>\n&#8211; The use of an Handler vs a Task when it comes to run operations on change<\/p>\n<p>On one side, having such liberty is pretty fun, as it leaves room for everyone&#8217;s imagination. But on the other, having some best practices or guidelines can also become very important, especially when working in a shared development environment (using git for example) and when you want to guarantee code uniformity.<\/p>\n<p>In the Ansible world, Ansible Lint is the tool to start with when you want to check your Playbooks and Roles code under various aspects.<br \/>\nIts goal is also to help developpers to write their code in a way that it remain compatible with newer versions of Ansible. To achive this Ansible Lint will, for instance, check the use of deprecated modules or commands.<\/p>\n<h3>Installation<\/h3>\n<div>\nAnsible Lint is not part of the Ansible package, so you have to install it on your system. If you&#8217;re working on a Debian\/Ubuntu based OS you can use the apt command :<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">apt install ansible-lint<\/pre>\n<\/div>\n<div>\nAs it&#8217;s a Python application you can also use Pip to install it :<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">pip3 install ansible-lint<\/pre>\n<\/div>\n<div>\nOnce installed, you should be able to check the version :<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">joc@jocbox:~$ ansible-lint --version \nansible-lint 5.0.7.dev3 using ansible 2.9.6 \njoc@jocbox:~$\n<\/pre>\n<p>&nbsp;\n<\/p><\/div>\n<div>\n<div><\/div>\n<h3>Default rules<\/h3>\n<p>By default, Ansible Lint will run based on a set of default rules. The complete list can be found in the official documentation : <a href=\"https:\/\/ansible-lint.readthedocs.io\/en\/latest\/default_rules.html\" target=\"_blank\" rel=\"noopener\">https:\/\/ansible-lint.readthedocs.io\/en\/latest\/default_rules.html<\/a><br \/>\nYou can also use the command <em>ansible-lint -L<\/em> to list them directly in your console :<\/p>\n<figure id=\"attachment_51636\" aria-describedby=\"caption-attachment-51636\" style=\"width: 1354px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/Screenshot-from-2021-09-24-11-02-06.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-51636 size-full\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/Screenshot-from-2021-09-24-11-02-06.jpg\" alt=\"\" width=\"1354\" height=\"701\" \/><\/a><figcaption id=\"caption-attachment-51636\" class=\"wp-caption-text\">Screenshot truncated &#8211; more than 40 rules exist by default<\/figcaption><\/figure>\n<\/div>\n<div>Ansible Lint can be run against a playbook. In that case all underlying roles will be scanned as well.<br \/>\nYou can also run it directly against a specific role :<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">joc@jocbox:\/ansible$ ansible-lint roles\/ora_rdbms_getmospatch\/*\nWARNING  Listing 1 violation(s) that are fatal\ndeprecated-local-action: Do not use 'local_action', use 'delegate_to: localhost'\nroles\/ora_rdbms_getmospatch\/tasks\/combo.yml:39   local_action:\njoc@jocbox:\/ansible$ ansible-lint roles\/ora_rdbms_getmospatch\/*<\/pre>\n<p>The output above is quite clear : The keyword <em>local_action<\/em> is deprecated and <em>delegate_to<\/em> must be used instead. This is one of the Ansible Lint default rules.<br \/>\nUnfortunately, in that case the delegation is done on a per-task basis (see below), thus I have no other choice to use <em>local_action<\/em>. We can consider this Warning as a false positive.<\/p>\n<h3>Skipping a rule<\/h3>\n<\/div>\n<div>\nIf you don&#8217;t want Ansible Lint to inform you again about a violation the next time you run the checks, you can add the related rule in the <em>skip_list<\/em> section of the configuration file :<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">joc@jocbox:~\/ansible$ cat .ansible-lint\nskip_list:\n- deprecated-local-action\njoc@jocbox:~\/ansible$<\/pre>\n<\/div>\n<div>\nOr you can use the -x argument of the command line :<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">joc@jocbox:\/ansible$ ansible-lint roles\/ora_rdbms_getmospatch\/* -x deprecated-local-action\njoc@jocbox:\/ansible$<\/pre>\n<\/div>\n<div>As you can imagine, the drawback of using the skip_list or -x is that the rule will be skipped for all your playbooks\/roles\/tasks.<br \/>\nHopefully, if the rule is line-based, you can disable it for a single task by placing <em># noqa [rule_id]<\/em> at the end of the particular line you want to be skipped :<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1; highlight: [4]\">- name: Copy combo patch to repository\n  become: true\n  become_user: ansible\n  local_action: # noqa deprecated-local-action\n  module: ansible.builtin.copy\n    src: \"{{ rv_ora_rdbms_getmospatch_tmp_folder }}\/{{ pv_ora_patch_list.combo[combo_patch_id].patch_archive | basename }}\"\n    dest: \"{{ pv_ora_patch_list.combo[combo_patch_id].patch_archive }}\"\n    owner: ansible\n    group: ansible\n  loop: \"{{ pv_ora_patch_list.combo | list }}\"\n  loop_control:\n    loop_var: combo_patch_id\n    label: \"{{ combo_patch_id }} - {{ pv_ora_patch_list.combo[combo_patch_id].desc }}\"<\/pre>\n<\/div>\n<div>\nYou can also use the tag <em>skip_ansible_lint<\/em> :<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1; highlight: [14,15]\">- name: Copy combo patch to repository\n  become: true\n  become_user: ansible\n  local_action: # noqa deprecated-local-action\n  module: ansible.builtin.copy\n    src: \"{{ rv_ora_rdbms_getmospatch_tmp_folder }}\/{{ pv_ora_patch_list.combo[combo_patch_id].patch_archive | basename }}\"\n    dest: \"{{ pv_ora_patch_list.combo[combo_patch_id].patch_archive }}\"\n    owner: ansible\n    group: ansible\n  loop: \"{{ pv_ora_patch_list.combo | list }}\"\n  loop_control:\n    loop_var: combo_patch_id\n    label: \"{{ combo_patch_id }} - {{ pv_ora_patch_list.combo[combo_patch_id].desc }}\"\n  tags:\n    - skip_ansible_lint<\/pre>\n<div>\n<p>&nbsp;<\/p>\n<\/div>\n<div>\n<h3><\/h3>\n<\/div>\n<\/div>\n<h3>Integration with pre-commit<\/h3>\n<div>Last but not least, Ansible Lint can also be integrated to <a href=\"https:\/\/pre-commit.com\/\" target=\"_blank\" rel=\"noopener\">pre-commit<\/a>. Very useful if you want to check you code automatically before pushing it to your git repository.<br \/>\nTo do that, just update your local <em>.pre-commit-config.yaml<\/em> file with the following :<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1]\">joc@jocbox:~\/ansible$ cat .pre-commit-config.yaml \nrepos:\n- repo: https:\/\/github.com\/ansible-community\/ansible-lint.git\n  rev: v5.1.3\n  hooks:\n    - id: ansible-lint\n      files: \\.(yaml|yml)$\njoc@jocbox:~\/ansible$\n<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction It&#8217;s always good to learn something new. But doing it the right way from the very beginning is even better. I recently started to work with Ansible and after creating a few roles, I quickly realized that there were many different ways to achieve the same goal. Some examples are : &#8211; The use&hellip;&nbsp;<\/p>\n","protected":false},"author":30,"featured_media":16698,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[1321,1320],"tags":[2304,492,2010,927],"class_list":["post-16697","post","type-post","status-publish","format-standard","has-post-thumbnail","category-ansible","category-devops","tag-code","tag-commit","tag-git","tag-role"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Scanning Ansible code with Ansible Lint - dbi services Blog<\/title>\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.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Scanning Ansible code with Ansible Lint\" \/>\n<meta property=\"og:description\" content=\"Introduction It&#8217;s always good to learn something new. But doing it the right way from the very beginning is even better. I recently started to work with Ansible and after creating a few roles, I quickly realized that there were many different ways to achieve the same goal. Some examples are : &#8211; The use&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-27T07:51:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/Screenshot-from-2021-09-24-11-02-06.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1354\" \/>\n\t<meta property=\"og:image:height\" content=\"701\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jo\u00ebl Cattin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jo\u00ebl Cattin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/\"},\"author\":{\"name\":\"Jo\u00ebl Cattin\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/caeaf637485f295f1be42de07b3ac4cf\"},\"headline\":\"Scanning Ansible code with Ansible Lint\",\"datePublished\":\"2021-09-27T07:51:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/\"},\"wordCount\":586,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/Screenshot-from-2021-09-24-11-02-06.jpg\",\"keywords\":[\"code\",\"Commit\",\"Git\",\"role\"],\"articleSection\":[\"Ansible\",\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/\",\"name\":\"Scanning Ansible code with Ansible Lint - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/Screenshot-from-2021-09-24-11-02-06.jpg\",\"datePublished\":\"2021-09-27T07:51:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/Screenshot-from-2021-09-24-11-02-06.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/Screenshot-from-2021-09-24-11-02-06.jpg\",\"width\":1354,\"height\":701},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/scanning-ansible-code-with-ansible-lint\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Scanning Ansible code with Ansible Lint\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/caeaf637485f295f1be42de07b3ac4cf\",\"name\":\"Jo\u00ebl Cattin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/JOC_web-scaled.jpg\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/JOC_web-scaled.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/JOC_web-scaled.jpg\",\"caption\":\"Jo\u00ebl Cattin\"},\"description\":\"Jo\u00ebl Cattin has more than seven years of experience in database management, specializing in Oracle solutions including Data Guard, RMAN, Oracle Database Appliance (ODA), Real Application Clusters (RAC), and APEX development, alongside PostgreSQL and MySQL. He is also experienced with AWS cloud solutions and Ansible-based IT automation. He holds Oracle Database 12c Administrator Certified Professional, EDB Postgres Advanced Server Certified Professional, RedHat Certified System Administrator, and ITIL V3 Foundation certifications, and leads three InSite Workshops (Oracle Basics, Linux for DBAs, and Ansible). He holds a degree from ESIG Del\u00e9mont.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/joel-cattin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Scanning Ansible code with Ansible Lint - dbi services Blog","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.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/","og_locale":"en_US","og_type":"article","og_title":"Scanning Ansible code with Ansible Lint","og_description":"Introduction It&#8217;s always good to learn something new. But doing it the right way from the very beginning is even better. I recently started to work with Ansible and after creating a few roles, I quickly realized that there were many different ways to achieve the same goal. Some examples are : &#8211; The use&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2021-09-27T07:51:48+00:00","og_image":[{"width":1354,"height":701,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/Screenshot-from-2021-09-24-11-02-06.jpg","type":"image\/jpeg"}],"author":"Jo\u00ebl Cattin","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Jo\u00ebl Cattin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/"},"author":{"name":"Jo\u00ebl Cattin","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/caeaf637485f295f1be42de07b3ac4cf"},"headline":"Scanning Ansible code with Ansible Lint","datePublished":"2021-09-27T07:51:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/"},"wordCount":586,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/Screenshot-from-2021-09-24-11-02-06.jpg","keywords":["code","Commit","Git","role"],"articleSection":["Ansible","DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/","url":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/","name":"Scanning Ansible code with Ansible Lint - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/Screenshot-from-2021-09-24-11-02-06.jpg","datePublished":"2021-09-27T07:51:48+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/Screenshot-from-2021-09-24-11-02-06.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/04\/Screenshot-from-2021-09-24-11-02-06.jpg","width":1354,"height":701},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/scanning-ansible-code-with-ansible-lint\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Scanning Ansible code with Ansible Lint"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/caeaf637485f295f1be42de07b3ac4cf","name":"Jo\u00ebl Cattin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/JOC_web-scaled.jpg","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/JOC_web-scaled.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/JOC_web-scaled.jpg","caption":"Jo\u00ebl Cattin"},"description":"Jo\u00ebl Cattin has more than seven years of experience in database management, specializing in Oracle solutions including Data Guard, RMAN, Oracle Database Appliance (ODA), Real Application Clusters (RAC), and APEX development, alongside PostgreSQL and MySQL. He is also experienced with AWS cloud solutions and Ansible-based IT automation. He holds Oracle Database 12c Administrator Certified Professional, EDB Postgres Advanced Server Certified Professional, RedHat Certified System Administrator, and ITIL V3 Foundation certifications, and leads three InSite Workshops (Oracle Basics, Linux for DBAs, and Ansible). He holds a degree from ESIG Del\u00e9mont.","url":"https:\/\/www.dbi-services.com\/blog\/author\/joel-cattin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=16697"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16697\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/16698"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=16697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=16697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=16697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}