Ansible - how to keep only 3 release -
i have vps sever deploy releases , dir structure have current dir, symlink actual release under releases dir. how can achieve, x ( in case 3) releases stay in releases dir, rest can deleted, spare free hdd , because don't need them more. setup capifony uses.
perhaps bit off-topic, give place start:
there ansible role in galaxy pointed @ replacing capistrano/capifony. example symfony2 project :-)
example usage:
to answer question more specifically:
the loop required clean releases folder either shell script or composition of ansible tasks (saving ls
output, sorting , removing). make smoother process, decided place logic in ansible module. module used in project_deploy role linked above. if prefer wrote own role, module extracted , placed in ot's own galaxy role:
finally, if you're interested in deeper @ why came current construction:
Comments
Post a Comment