Comments (10)
It's not supported for now, but we'll consider as a new feature. Thanks!
from rollback.
@carlosbuenosvinos Eager to see that feature :)
from rollback.
Hi Carlos.
When I launch the rollback playbook always restore the first release when should be the last.
Can you help me to understand the problem?
Thanks.
This is my playbooks content:
Deploy:
-
name: Deploy the application
hosts: all
remote_user: "{{ production_deploy_user }}"
sudo: novars:
ansistrano_deploy_from: "../snowflake" # Base path to deploy from.
ansistrano_deploy_to: "../snowflake3" # Base path to deploy to.
ansistrano_version_dir: "releases" # Releases folder name
ansistrano_current_dir: "current" # Softlink name. You should rarely changed it.
ansistrano_remove_rolled_back: yes # You can change this setting in order to keep the rolled back release in the server for later inspection
ansistrano_allow_anonymous_stats: yes
ansistrano_keep_releases: 3roles:
- carlosbuenosvinos.ansistrano-deploy
Rollback:
-
name: Rollback the application
hosts: all
remote_user: "{{ production_deploy_user }}"
sudo: novars:
ansistrano_deploy_to: "../snowflake3" # Base path to deploy to.
ansistrano_version_dir: "releases" # Releases folder name
ansistrano_current_dir: "current" # Softlink name. You should rarely changed it.roles:
- carlosbuenosvinos.ansistrano-rollback
from rollback.
Hi @cespedosa . Not sure if this will fix your problem, but I found that the ls commands in tasks/setup.yml were invalid. As written, the "-1t" appears after the release path, whereas it should be before, surely?
So each one needs switching around to look like:
shell: echo `ls -1t {{ ansistrano_releases_path.stdout }} | wc -l`
or similar. After making those changes, I found the role far more useful.
from rollback.
At least in Ubuntu you can put -1t before or after the release path... are you having an issue in some particular Linux distro? Rollback works as expected for many people
from rollback.
Hi @ricardclau . I'm on FreeBSD (same applies on Mac OS and probably other BSDs):
app1% touch test.txt
app1% ls test.txt -1t
ls: -1t: No such file or directory
test.txt
app1% ls -1t test.txt
test.txt
(Edit: removed man page reference]
from rollback.
Yeah, I suspected that, same happens in Mac as you said :)
Cool, will modify the ls calls, thanks!
from rollback.
Hi @ratbag98 and @cespedosa can you please test fix_bsd branch at #14 ?
from rollback.
@ricardclau - will test more fully later, but I can say that your code is identical to my revised code, so that's good enough for me. :) Thanks for the speedy responses.
from rollback.
Cool, will merge and tag as this is currently broken for such distros
Please @cespedosa provide more feedback when you get some time!
from rollback.
Related Issues (8)
- Add stats for rollbacks as we have in deployments ;) HOT 2
- is there a variable that gives me the name of the rollbacked version? HOT 2
- Rollback without deleting HOT 1
- deploy variables when executing rollback role when set in group vars HOT 1
- ansistrano_shared_path is not defined HOT 2
- I think... HOT 2
- Latest version with ansible-galaxy HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rollback.