# New Adopter, Some Thoughts

**URL:** <https://forum.ansible.com/t/new-adopter-some-thoughts/13030>\
**Category:** Ansible Project\
**Created:** [June 27, 2013, 9:25pm UTC](https://forum.ansible.com/t/new-adopter-some-thoughts/13030 "2013-06-27T21:25:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Montuori](https://avatars.discourse-cdn.com/v4/letter/k/bbce88/32.png) [@Kevin\_Montuori](https://forum.ansible.com/u/Kevin_Montuori)\
**Post date:** [June 27, 2013, 9:25pm UTC](https://forum.ansible.com/t/new-adopter-some-thoughts/13030/1 "2013-06-27T21:25:04Z")

</div>

Hi All --

I've been leveraging Ansible for a few weeks now to provision and  
configure ephemeral "demo" and "development" instances on EC2, to the  
great delight of the dev and product management teams I support. My  
hearty thanks to everyone who's contributed, it's a very usable product  
and doesn't suffer from some of the pitfalls of other configuration  
management solutions.

I have a few comments that I don't want construed as complaints: it's  
entirely possible that I'm either not fully tuned in to the Ansible Way  
or maybe I haven't read the correct sentence in the documentation yet.

\* I don't always know in advance what playbooks I want to run on what  
&nbsp;&nbsp;hosts and once I've figured that out I don't always have an  
&nbsp;&nbsp;appropriate inventory file available (my instances are ephemeral and  
&nbsp;&nbsp;often multi-use). To support that:

&nbsp;&nbsp;- I'd like to be able to feed ansible-playbook a host pattern, just  
&nbsp;&nbsp;&nbsp;&nbsp;like ansible; and,

&nbsp;&nbsp;- I'd like to be able to specify a hostname (and no inventory file at  
&nbsp;&nbsp;&nbsp;&nbsp;all) on the ansible-playbook and ansible command lines.

&nbsp;&nbsp;Are there any efforts underway to provide this functionality? If not,  
&nbsp;&nbsp;are there strong objections to allowing it if I were to submit a pull  
&nbsp;&nbsp;request implementing it?

\* The S3 module is presumably useful in some cases but missing half of  
&nbsp;&nbsp;the functionality I'd expect: specifically, I'd like to provide a  
&nbsp;&nbsp;bucket/path and a filesystem destination and have the file specified  
&nbsp;&nbsp;downloaded to the destination. Would you see this as a separate  
&nbsp;&nbsp;module entirely (I've implemented a rough version as S3slurp) or is it  
&nbsp;&nbsp;more appropriate to augment the existing S3 module?

\* There are times I'd like my dev staff to be able to "lock out" Ansible  
&nbsp;&nbsp;updates in a way that I, the Ansible driver, don't have to know  
&nbsp;&nbsp;about. I have a little module to do this (I've dubbed it "lockcheck")  
&nbsp;&nbsp;that looks roughly like:

&nbsp;&nbsp;&nbsp;&nbsp;pre\_tasks:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- name: check for lockfile  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;action: lockcheck lockfile=/var/tmp/no.provision

&nbsp;&nbsp;&nbsp;&nbsp;....

&nbsp;&nbsp;&nbsp;&nbsp;lockfile = module.params.get('lockfile')  
&nbsp;&nbsp;&nbsp;&nbsp;if os.path.exists(lockfile):  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;module.fail\_json(msg="lockfile %s exists" % lockfile)  
&nbsp;&nbsp;&nbsp;&nbsp;else:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;module.exit\_json(changed=False)

&nbsp;&nbsp;so that the dev can simply touch or rm a file and have the right thing  
&nbsp;&nbsp;happen (where "right thing" in this instance is an early playbook  
&nbsp;&nbsp;failure on the host). Any interest in this as part of the standard  
&nbsp;&nbsp;library; if so, suggestions for an appropriate name?

\* I'd very much like to have a "when" variant that executes a command  
&nbsp;&nbsp;(just like the command module does) on the target host and uses the  
&nbsp;&nbsp;exit code to determine if the action should be taken or not. This is  
&nbsp;&nbsp;achievable with two steps (execute the command and capture the result,  
&nbsp;&nbsp;use the result in the next play) but then I have plays that are only  
&nbsp;&nbsp;being used for their side effects. Am I alone in missing this  
&nbsp;&nbsp;functionality (or, perhaps, not understanding the full range of tests  
&nbsp;&nbsp;that "when" can perform)?

\* Has any thought gone into allowing some parts of a playbook to be run  
&nbsp;&nbsp;in parallel? My use case is pretty simple: I have a half dozen  
&nbsp;&nbsp;products that need to be released when provisioning a demo host that  
&nbsp;&nbsp;could be executed simultaneously. The only benefit in this case is  
&nbsp;&nbsp;faster execution (it would take about 1/6 the time) but given the  
&nbsp;&nbsp;circumstances in which a demo host is being provisioned, an extra  
&nbsp;&nbsp;minute or two matters (some).

\* And a couple of documentation/website comments:

&nbsp;&nbsp;- the Technology -\> Downloads page doesn't actually have a link to  
&nbsp;&nbsp;&nbsp;&nbsp;either a downloadable package or to the source;

&nbsp;&nbsp;- a reference guide to the directives that comprise a playbook would  
&nbsp;&nbsp;&nbsp;&nbsp;be hugely helpful -- there's pretty good documentation once you know  
&nbsp;&nbsp;&nbsp;&nbsp;about the directive but sometimes knowing that it exists is most of  
&nbsp;&nbsp;&nbsp;&nbsp;the battle;

&nbsp;&nbsp;- the "Module Development" page essentially says RTFS and never  
&nbsp;&nbsp;&nbsp;&nbsp;completes the "time" module with the standard module boilerplate  
&nbsp;&nbsp;&nbsp;&nbsp;... examples are great but an API doc would be more helpful;

&nbsp;&nbsp;- I didn't see mentioned anywhere that home grown modules have to be  
&nbsp;&nbsp;&nbsp;&nbsp;used in playbooks as:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;action: module name=quux

&nbsp;&nbsp;&nbsp;&nbsp;instead of

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;module: name=quux

&nbsp;&nbsp;&nbsp;&nbsp;clarification on that point might save the next guy some time.

Thanks again for a useful product. I'm looking forward to seeing how it  
develops.

k.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [June 27, 2013, 10:44pm UTC](https://forum.ansible.com/t/new-adopter-some-thoughts/13030/2 "2013-06-27T22:44:28Z")

</div>

Hi Kevin,

Thanks for some really good feedback, I’ve replied inline.
