New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global ignore_errors #7852

Closed
ryan-lane opened this Issue Jun 19, 2014 · 4 comments

Comments

Projects
None yet
5 participants
@ryan-lane

ryan-lane commented Jun 19, 2014

Issue Type:

Feature Idea

Ansible Version:

ansible 1.6.3

Environment:

n/a

Summary:

My playbooks take quite a while to run (a couple minutes for no-change runs) and if I add 10 tasks while developing and they have errors, I need to re-run the playbook over and over to fix each iterative issue, making a small change take possibly a very long time. It would be nice if I could set a configuration setting to continue on error globally so that I can have all the tasks run, fix the red ones, then vagrant destroy/up and ensure nothing is still red.

Steps To Reproduce:

n/a

Expected Results:

n/a

Actual Results:

n/a

@mpdehaan

This comment has been minimized.

Contributor

mpdehaan commented Jun 20, 2014

The whole point of Ansible is to make errors be fixed rather than to keep going, so I'm disinterested in this feature. You may enjoy the '--start-at-task' or '--tags' options.

@mpdehaan mpdehaan closed this Jun 20, 2014

@vfguy

This comment has been minimized.

vfguy commented Feb 25, 2016

wow. nice way to dismiss a person. Just because YOU aren't interested in this feature, doesn't mean it's not useful to others, myself included.

@HontoNoRoger

This comment has been minimized.

HontoNoRoger commented Jan 6, 2017

While it's true what @mpdehaan stated, it would be a nice feature for the check mode.

Consider an example where you have a large role or playbook and want to run your check until the end, so you can fix occuring errors in one go and not iterative. Also, you could see what would fail because of previous tasks failing.

UPDATE:

Ignore what I mentioned, I just saw there's something like that already. You can specify
ignore_errors: "{{ ansible_check_mode }}"
on a play globally, which meets my use case. Thanks!

@mattock

This comment has been minimized.

mattock commented Jun 22, 2017

It is rather disappointing that it is not possible to set ignore_errors on the command-line. This renders the --check feature way less useful than the equivalent feature, --noop in Puppet, for example.

As --check will not make any changes to the system, it is only natural that a task that depends on a previous task will fail. For example, you cannot add a SSH key for a user unless that user has been created. Similarly, you cannot enable a service unless a package containing that service has been installed. These are very common scenarios, and being able to do a proper dry-run and being able to guage yourself which errors really matter would be highly useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment