Massoud Mazar

Sharing The Knowledge

NAVIGATION - SEARCH

Simple Ansible filter plugin

For a recent project, I used Ansible to configure a bunch of servers. One of the servers needed to be configured as NIS server and part of that configuration is to execute ypinit. When running ypinit script, it asks for some user input and requires users enter CTRL-D when all server names are entered. To automate this through Ansible, I had to somehow pass the CTRL-D (character x04) to stdin, but jinja2 or Ansible did not have a an easy way to do that, so I used a filter plugin.More...