Skip to content
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

Ansible --check mode fails on "Delete ruby if relevant" #218

Closed
thbar opened this issue Jul 30, 2020 · 1 comment · Fixed by #219
Closed

Ansible --check mode fails on "Delete ruby if relevant" #218

thbar opened this issue Jul 30, 2020 · 1 comment · Fixed by #219
Labels

Comments

@thbar
Copy link
Contributor

thbar commented Jul 30, 2020

While working on maintenance for a client, I noticed that #212 will fail when I run in --check mode:

TASK [rvm.ruby : List installed versions of Ruby (for deletion)] ****************************************************************************
skipping: [vagrant-xyz]

TASK [rvm.ruby : Delete ruby if relevant] ***************************************************************************************************
fatal: [vagrant-xyz]: FAILED! => 
  msg: |-
    The conditional check 'rvm1_delete_ruby in rvm1_list_installed_rubies.stdout.splitlines()' failed. The error was: error while evaluating conditional (rvm1_delete_ruby in rvm1_list_installed_rubies.stdout.splitlines()): 'dict object' has no attribute 'stdout'
  
    The error appears to be in '/REDACTED/roles/rvm.ruby/tasks/rubies.yml': line 71, column 3, but may
    be elsewhere in the file depending on the exact syntax problem.
  
    The offending line appears to be:
  
  
    - name: Delete ruby if relevant
      ^ here

The list check just before is skipped, resulting in that error.

This is not necessarily a blocker, but it will be better to fix that at some point because --check mode is an important feature of Ansible.

Poke @danochoa in case you happen to test this out later!

@gildegoma
Copy link
Contributor

I baked something to run some --check tests during the CI builds. I may propose it as part of #219, or simply after this one get merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants