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

Write chapter 15 (debugging) #63

Open
leucos opened this issue Jun 23, 2014 · 1 comment
Open

Write chapter 15 (debugging) #63

leucos opened this issue Jun 23, 2014 · 1 comment

Comments

@leucos
Copy link
Owner

leucos commented Jun 23, 2014

Demonstrate debugging techniques as suggested in #58

@leucos
Copy link
Owner Author

leucos commented Jun 23, 2014

Demonstrate set_fact trick for skipped tasks in check mode :

- name: Checks if target ruby is installed
  shell: cd; bash -lc "rbenv versions | grep {{ ruby_version }} | tr '*' ' ' | sed -e 's/\s\+//' | cut -f1 -d' '"
  register: ruby_is_installed
  changed_when: ruby_is_installed.stdout != ruby_version

- name: Sets fake ruby version for check mode
  set_fact:
    ruby_is_installed: { 'stdout': "{{ruby_version}}" }
  when: ruby_is_installed|skipped

@leucos leucos changed the title Wite chapter 15 (debugging) Write chapter 15 (debugging) Sep 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant