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

Use && for executing next command if, and only if, command1 returns an e... #1335

Merged
merged 2 commits into from
Oct 16, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docsite/rst/playbooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ who's successful exit code is not zero, you may wish to do this::

tasks:
- name: run this command and ignore the result
action: shell /usr/bin/somecommand & /bin/true
action: shell /usr/bin/somecommand && /bin/true

Variables can be used in action lines. Suppose you defined
a variable called 'vhost' in the 'vars' section, you could do this::
Expand Down
1 change: 1 addition & 0 deletions library/apt_repository
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ options:
choices: [ "present", "absent" ]
notes:
- This module works on Debian and Ubuntu only and requires C(apt-add-repository) be available on destination server. To ensure this package is available use the C(apt) module and install the C(python-software-properties) package before using this module.
- This module works not on Debian Squeeze (Version 6) as there is no implementation of C(add-apt-repository) in C(python-software-properties)
- A bug in C(apt-add-repository) always adds C(deb) and C(deb-src) types for repositories (see the issue on Launchpad U(https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/987264)), if a repo doesn't have source information (eg MongoDB repo from 10gen) the system will fail while updating repositories.
author: Matt Wright
examples:
Expand Down