<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:9.0pt;
font-family:"Verdana",sans-serif;
color:#243F60;
mso-fareast-language:EN-US;}
h1
{mso-style-priority:9;
mso-style-link:"Heading 1 Char";
margin-top:24.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:14.0pt;
font-family:"Verdana",sans-serif;
color:#365F91;
mso-fareast-language:EN-US;}
h2
{mso-style-priority:9;
mso-style-link:"Heading 2 Char";
margin:0in;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:13.0pt;
font-family:"Verdana",sans-serif;
color:#4F81BD;
mso-fareast-language:EN-US;}
h3
{mso-style-priority:9;
mso-style-link:"Heading 3 Char";
margin:0in;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:9.0pt;
font-family:"Verdana",sans-serif;
color:#4F81BD;
mso-fareast-language:EN-US;}
h4
{mso-style-priority:9;
mso-style-link:"Heading 4 Char";
margin:0in;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:9.0pt;
font-family:"Verdana",sans-serif;
color:#4F81BD;
mso-fareast-language:EN-US;
font-style:italic;}
h5
{mso-style-priority:9;
mso-style-link:"Heading 5 Char";
margin:0in;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:9.0pt;
font-family:"Verdana",sans-serif;
color:#243F60;
mso-fareast-language:EN-US;
font-weight:normal;}
h6
{mso-style-priority:9;
mso-style-link:"Heading 6 Char";
margin:0in;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:9.0pt;
font-family:"Verdana",sans-serif;
color:#243F60;
mso-fareast-language:EN-US;
font-weight:normal;
font-style:italic;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
{mso-style-priority:10;
mso-style-link:"Title Char";
margin-top:0in;
margin-right:0in;
margin-bottom:15.0pt;
margin-left:0in;
mso-add-space:auto;
font-size:26.0pt;
font-family:"Verdana",sans-serif;
color:#17365D;
letter-spacing:.25pt;
mso-fareast-language:EN-US;}
p.MsoTitleCxSpFirst, li.MsoTitleCxSpFirst, div.MsoTitleCxSpFirst
{mso-style-priority:10;
mso-style-link:"Title Char";
mso-style-type:export-only;
margin:0in;
margin-bottom:.0001pt;
mso-add-space:auto;
font-size:26.0pt;
font-family:"Verdana",sans-serif;
color:#17365D;
letter-spacing:.25pt;
mso-fareast-language:EN-US;}
p.MsoTitleCxSpMiddle, li.MsoTitleCxSpMiddle, div.MsoTitleCxSpMiddle
{mso-style-priority:10;
mso-style-link:"Title Char";
mso-style-type:export-only;
margin:0in;
margin-bottom:.0001pt;
mso-add-space:auto;
font-size:26.0pt;
font-family:"Verdana",sans-serif;
color:#17365D;
letter-spacing:.25pt;
mso-fareast-language:EN-US;}
p.MsoTitleCxSpLast, li.MsoTitleCxSpLast, div.MsoTitleCxSpLast
{mso-style-priority:10;
mso-style-link:"Title Char";
mso-style-type:export-only;
margin-top:0in;
margin-right:0in;
margin-bottom:15.0pt;
margin-left:0in;
mso-add-space:auto;
font-size:26.0pt;
font-family:"Verdana",sans-serif;
color:#17365D;
letter-spacing:.25pt;
mso-fareast-language:EN-US;}
p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
{mso-style-priority:11;
mso-style-link:"Subtitle Char";
margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Verdana",sans-serif;
color:#4F81BD;
letter-spacing:.75pt;
mso-fareast-language:EN-US;
font-style:italic;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
{mso-style-priority:1;
margin-top:10.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
margin-bottom:.0001pt;
font-size:9.0pt;
font-family:"Verdana",sans-serif;
color:#243F60;
mso-fareast-language:EN-US;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
mso-add-space:auto;
font-size:9.0pt;
font-family:"Verdana",sans-serif;
color:#243F60;
mso-fareast-language:EN-US;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
{mso-style-priority:34;
mso-style-type:export-only;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
mso-add-space:auto;
font-size:9.0pt;
font-family:"Verdana",sans-serif;
color:#243F60;
mso-fareast-language:EN-US;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
{mso-style-priority:34;
mso-style-type:export-only;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
mso-add-space:auto;
font-size:9.0pt;
font-family:"Verdana",sans-serif;
color:#243F60;
mso-fareast-language:EN-US;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
{mso-style-priority:34;
mso-style-type:export-only;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
mso-add-space:auto;
font-size:9.0pt;
font-family:"Verdana",sans-serif;
color:#243F60;
mso-fareast-language:EN-US;}
span.MsoSubtleEmphasis
{mso-style-priority:19;
color:gray;
font-style:italic;}
span.Heading1Char
{mso-style-name:"Heading 1 Char";
mso-style-priority:9;
mso-style-link:"Heading 1";
font-family:"Verdana",sans-serif;
color:#365F91;
font-weight:bold;}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-priority:9;
mso-style-link:"Heading 2";
font-family:"Verdana",sans-serif;
color:#4F81BD;
font-weight:bold;}
span.TitleChar
{mso-style-name:"Title Char";
mso-style-priority:10;
mso-style-link:Title;
font-family:"Verdana",sans-serif;
color:#17365D;
letter-spacing:.25pt;}
span.SubtitleChar
{mso-style-name:"Subtitle Char";
mso-style-priority:11;
mso-style-link:Subtitle;
font-family:"Verdana",sans-serif;
color:#4F81BD;
letter-spacing:.75pt;
font-style:italic;}
span.Heading3Char
{mso-style-name:"Heading 3 Char";
mso-style-priority:9;
mso-style-link:"Heading 3";
font-family:"Verdana",sans-serif;
color:#4F81BD;
font-weight:bold;}
span.Heading4Char
{mso-style-name:"Heading 4 Char";
mso-style-priority:9;
mso-style-link:"Heading 4";
font-family:"Verdana",sans-serif;
color:#4F81BD;
font-weight:bold;
font-style:italic;}
span.Heading5Char
{mso-style-name:"Heading 5 Char";
mso-style-priority:9;
mso-style-link:"Heading 5";
font-family:"Verdana",sans-serif;
color:#243F60;}
span.Heading6Char
{mso-style-name:"Heading 6 Char";
mso-style-priority:9;
mso-style-link:"Heading 6";
font-family:"Verdana",sans-serif;
font-style:italic;}
span.EmailStyle30
{mso-style-type:personal;
font-family:"Verdana",sans-serif;
color:windowtext;}
span.EmailStyle31
{mso-style-type:personal-reply;
font-family:"Verdana",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=NL link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:windowtext'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:windowtext'>For fun and (non-)profit I decided </span><span lang=EN-US>to put some effort into creating a new ansible lookup plugin last weekend. Primarily for my own needs, but also inspired by a fellow hacker at my local hackerspace. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>As this is my first plugin for ansible I’m sure things could be better. Therefore I present to you to review, use or otherwise criticize, a pass lookup module. For those interested, it can be found at </span><a href="https://github.com/morphje/ansible_pass_lookup" target="_blank"><span lang=EN-US>https://github.com/morphje/ansible_pass_lookup</span></a><span lang=EN-US>. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><br>My usecases were (examples in the readme too):<br>lookup a password ( password="{{ lookup('pass', 'example/test'}} )<br>If the password does not exist, create one at random (specified by create=true flag)<br>If the password exists and needs to be overwritten (create=true overwrite=true)<br>change the directory of the password store (specified by directory=dir)<br>specify the password length when creating (specified by length=42, default is 16 chars)<br>return all lines from the password file (specified by returnall=true)<br>switch to a different pass directory (specified by directory=\home\morphje\projects\fooproject\pass)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><br>Finally i wanted to ensure myself that old passwords and comments were retained when updating passwords, so this lookup adds a copy of old content/password in the password file when a new password is inserted.<br><br>For now all functionality does seem to work and i've tested both with the latest stable version of pass and the Ubuntu 14.04 default. <o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>I have tested this plugin on ansible 2.0.1, but it should work on earlier versions too. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Looking forward to your replies.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal>Regards,<br>Patrick Deelman<span lang=EN-US style='color:windowtext'><o:p></o:p></span></p></div></body></html>