On 21 December 2013 02:29, Rafał Hajduk <[email protected]> wrote:

> What I understand as deployment is:
>
> 1. Upload new version of code (specified git branch) to /{timestamp}/
> 2. Replace current .htaccess with "Deny from all"
> 3. Change symlink /current/ to timestamp
> 4. Perfrom all SQL queries that change anything in databases
> 5. Restore old .htaccess file
> 6. Delete /{older-timestamp}/
>
> It seems that the only way to achieve it in Ansible is to write a bash
> script oneself and tell Ansible to execute it. Am I wrong?

You could run each of these steps as separate tasks in a playbook.
Have a look at the documentation on playbooks:

http://www.ansibleworks.com/docs/#playbooks

K

Kahlil (Kal) Hodgson                       GPG: C9A02289
Head of Technology                         (m) +61 (0) 4 2573 0382
DealMax Pty Ltd                            (w) +61 (0) 3 9008 5281

Suite 1415
401 Docklands Drive
Docklands VIC 3008 Australia

"All parts should go together without forcing.  You must remember that
the parts you are reassembling were disassembled by you.  Therefore,
if you can't get them together again, there must be a reason.  By all
means, do not use a hammer."  -- IBM maintenance manual, 1925

-- 
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