Giter VIP home page Giter VIP logo

Comments (10)

carlosbuenosvinos avatar carlosbuenosvinos commented on May 24, 2024

It's not supported for now, but we'll consider as a new feature. Thanks!

from rollback.

AjeetK avatar AjeetK commented on May 24, 2024

@carlosbuenosvinos Eager to see that feature :)

from rollback.

cespedosa avatar cespedosa commented on May 24, 2024

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

    vars:
    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: 3

    roles:

    • carlosbuenosvinos.ansistrano-deploy

Rollback:


  • name: Rollback the application
    hosts: all
    remote_user: "{{ production_deploy_user }}"
    sudo: no

    vars:
    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.

ratbag98 avatar ratbag98 commented on May 24, 2024

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.

ricardclau avatar ricardclau commented on May 24, 2024

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.

ratbag98 avatar ratbag98 commented on May 24, 2024

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.

ricardclau avatar ricardclau commented on May 24, 2024

Yeah, I suspected that, same happens in Mac as you said :)

Cool, will modify the ls calls, thanks!

from rollback.

ricardclau avatar ricardclau commented on May 24, 2024

Hi @ratbag98 and @cespedosa can you please test fix_bsd branch at #14 ?

from rollback.

ratbag98 avatar ratbag98 commented on May 24, 2024

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

ricardclau avatar ricardclau commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.