<?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 BrainBit Latest Articles</title><link>https://brainbit.uk/tags/ansible/</link><description>Recent content in ansible on BrainBit Latest Articles</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sat, 26 Nov 2016 14:34:50 +0000</lastBuildDate><atom:link href="https://brainbit.uk/tags/ansible/index.xml" rel="self" type="application/rss+xml"/><item><title>UNREACHABLE!</title><link>https://brainbit.uk/posts/unreachable/</link><pubDate>Sat, 26 Nov 2016 14:34:50 +0000</pubDate><guid>https://brainbit.uk/posts/unreachable/</guid><description>Have you ever run some ansible playbook and you get a message similar to: But you know the host is “reachable” , because you can ssh into it , it just happens that the ansible’s host ssh key isn’t on the node .
The word “UNREACHABLE” means (at least to me) that you can’t connect to port 22 (in this case) either because there’s no routing or there’s no application(ssh in this case) binding port 22.</description></item><item><title>Repl for jinja2</title><link>https://brainbit.uk/posts/repl-for-jinja/</link><pubDate>Fri, 07 Oct 2016 16:24:32 +0000</pubDate><guid>https://brainbit.uk/posts/repl-for-jinja/</guid><description>As i work with Ansible (or I try to learn Ansible) sometimes i want to test little j2 snippets (Used in templates/when conditions / others within Ansible). You can ipython (or your fav repl ) and do it manually or you can use (and contribute) to this little tool i built yesterday.
I’ve called jinrepl (lack of a better name) , and it basically evals strings into j2.template and renders it , nothing major, but with a few neat features.</description></item><item><title>Logging Ansible</title><link>https://brainbit.uk/posts/logging-ansible/</link><pubDate>Thu, 06 Oct 2016 10:18:12 +0000</pubDate><guid>https://brainbit.uk/posts/logging-ansible/</guid><description>It’s important to have some kind of logging when things go wrong , and when they go right too .Somehow Ansible seems to log (to syslog (LOG_INFO facility))
Given this very basic playbook:
if you run something like: ( -vvv critical as otherwise, nothing goes to syslog)
ansible-playbook -i hosts demo.yml -**vvv** You will get some thing like:
which us quite neat , but what happens when things go wrong?, im gonna change the command I’m running to “decho” instead of “echo” , as we all know that’s gonna trigger some kind of error:</description></item><item><title>Ansible Conditionals quick dive</title><link>https://brainbit.uk/posts/ansible-conditionals-quick-dive/</link><pubDate>Wed, 05 Oct 2016 12:36:17 +0000</pubDate><guid>https://brainbit.uk/posts/ansible-conditionals-quick-dive/</guid><description>I feel like , this is too much , too much typing to do something so simple:
Somehow i think this should simplified , i think the assertion at the top is too much to test something so simple , I’d like something like:
If you not gonna reuse passwd_exist anymore what’s the point of another task to get this done.
Now I’m by no means an Ansible expert but i was wondering how complicated would it be to implement something like that , i went to freenode and the confirmed the only way to get this done was by having that “check” task :</description></item></channel></rss>