Created
February 20, 2014 16:57
-
-
Save phips/9118380 to your computer and use it in GitHub Desktop.
Ansible: Check command output, react in next task
This file contains 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: Red Hat - Check subscription status | |
shell: /usr/sbin/subscription-manager list | |
register: subs | |
when: ansible_distribution == 'RedHat' | |
- name: Red Hat - Ensure registered to RHN (1/2) | |
shell: /usr/sbin/subscription-manager register --username USER --password PASS | |
when: ansible_distribution == 'RedHat' and "Subscribed" not in subs.stdout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment