Created
January 19, 2014 08:07
-
-
Save adenot/8501834 to your computer and use it in GitHub Desktop.
Ansible playbook: Avoid apt module report changed when no packages actually changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Ensure packages are installed | |
| apt: pkg={{ item }} state=present | |
| with_items: | |
| - git | |
| - python-keyczar | |
| - php5-cli | |
| - php5-sqlite | |
| - php5-json | |
| - php5-mcrypt | |
| - php-gettext | |
| - gettext | |
| register: apt_output | |
| changed_when: apt_output.stdout.find("0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded") == -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment