<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ansible on Nikhil&#39;s blog</title>
    <link>https://master--suspicious-stonebraker-7d2d21.netlify.app/tags/ansible/</link>
    <description>Recent content in Ansible on Nikhil&#39;s blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <lastBuildDate>Mon, 03 Oct 2016 13:48:36 -0700</lastBuildDate>
    <atom:link href="https://master--suspicious-stonebraker-7d2d21.netlify.app/tags/ansible/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Understanding Ansible and Jinja2&#39;s default() filter</title>
      <link>https://master--suspicious-stonebraker-7d2d21.netlify.app/post/2016/understanding-ansible-jinja2-default-filter/</link>
      <pubDate>Mon, 03 Oct 2016 13:48:36 -0700</pubDate>
      <guid>https://master--suspicious-stonebraker-7d2d21.netlify.app/post/2016/understanding-ansible-jinja2-default-filter/</guid>
      <description>I have been using Ansible at work for the past month to set up some infrastructure. I wanted to express the following in the setup script:&#xA;ansible_ssh_user: &amp;#34;{{ lookup(&amp;#39;env&amp;#39;, &amp;#39;SSH_USER&amp;#39;) }}&amp;#34; but wanted to set the user to ubuntu if SSH_USER was not set.&#xA;For some reason, this would not work:&#xA;ansible_ssh_user: &amp;#34;{{ lookup(&amp;#39;env&amp;#39;, &amp;#39;SSH_USER&amp;#39;) | default(&amp;#39;ubuntu&amp;#39;) }}&amp;#34; Ansible provides several functions that can extract various string values from the environment.</description>
    </item>
  </channel>
</rss>
