I'd actually done this with my local copy over the weekend and tied it into 
the deploy.yml that gets included. I'm still very much iterating, but 
ansible let me get atomic deploys up and running over the weekend for three 
deploys (two apps, one with a staging branch) on a super-crusty-old server 
that is due to be rebuilt next month.

"-e" flag, for git?  Not sure I'm familiar with this... maybe I 
misunderstand?

I may not understand how this works, so please correct me if this is the 
case - but I was exporting the timestamp on the local (aka deployment) 
machine and register that as a variable to be used on the node(s) when 
deploying.  I considered using a git sha1 for the build too - but then my 
"keepers" pruning won't work reliably. I don't have strict build tag 
numbers (yet) from my CI system, but that would also be another option.


On Sunday, December 29, 2013 7:25:28 PM UTC-5, Michael DeHaan wrote:
>
> I'd maybe consider passing in what version (git tag, etc?) you are 
> deploying with "-e" and then you could probably save the "timestamp" step 
> too.
>
> Note that the timestamp might be different between hosts, so passing it in 
> seems better to me, that way your directory names would be consistent. 
>
> (Or otherwise, use the hostvars trick to get the variable from a very 
> specific host)
>
>
>
> On Sun, Dec 29, 2013 at 10:52 AM, Brian Coca <[email protected]<javascript:>
> > wrote:
>
>> nothing broken I can see, but a few things:
>>
>> - local_action: and delegate_to: 127.0.0.1 mean the same thing you can 
>> remove one, don't need both.
>>
>> - sudo: false is the default, since you don't set it to true at the play 
>> level you should only need to set it to true for tasks that require it.
>>
>> - git archive can create a tarball that already doesn't have special 
>> files/dirs
>>
>>
>>
>> -- 
>> Brian Coca
>> Stultorum infinitus est numerus
>>
>> 0110000101110010011001010110111000100111011101000010000001111001011011110111010100100000011100110110110101100001011100100111010000100001
>> Pedo mellon a minno
>>  
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Michael DeHaan <[email protected] <javascript:>>
> CTO, AnsibleWorks, Inc.
> http://www.ansibleworks.com/
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to