Skip to content

Instantly share code, notes, and snippets.

@mrlesmithjr
Created December 7, 2017 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrlesmithjr/039a7bccf342e456dc6f9cbb2474c995 to your computer and use it in GitHub Desktop.
Save mrlesmithjr/039a7bccf342e456dc6f9cbb2474c995 to your computer and use it in GitHub Desktop.
- hosts: all
tasks:
- name: Ansible check directory exists.
stat:
path=/etc/yum.repos.d
register: p
- debug:
msg: "Path exists and is a directory"
when: p.stat.isdir is defined and p.stat.isdir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment