Created
June 4, 2016 19:11
-
-
Save jbgo/2a04cae6626116858d5bc660fbeaec1c to your computer and use it in GitHub Desktop.
Iteration 2 Playbook - Stupid DevOps Tricks: Executable IT docs with Ansible
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: Install a new client (https://confluence.example.com/foo/bar/biz-baz) | |
hosts: app.example.com | |
gather_facts: false | |
tasks: | |
- name: Verify that the NFS images share is mounted | |
shell: "df -h | grep nfs.example.com:/srv/images" | |
register: nfs_check | |
changed_when: false | |
failed_when: false | |
- name: Mount the NFS images share if it's not currently mounted | |
shell: "mount nfs.example.com:/srv/images /images" | |
register: nfs_mount | |
when: "{{nfs_check.rc != 0}}" | |
changed_when: "{{nfs_check.rc != 0}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment