Skip to content

Instantly share code, notes, and snippets.

@ashcrow
Last active October 12, 2016 19:48
Show Gist options
  • Save ashcrow/8eaa9d24842c51a008bb7ebb45204d7c to your computer and use it in GitHub Desktop.
Save ashcrow/8eaa9d24842c51a008bb7ebb45204d7c to your computer and use it in GitHub Desktop.
Example is_atomic
---
- set_fact:
is_atomic: False
- name: Checking for Atomic model
stat:
path: /run/ostree-booted
register: ostree_booted
ignore_errors: True
- name: Update is_atomic if using the Atomic model
set_fact:
is_atomic: "{{ ostree_booted.stat.exists }}"
when: ostree_booted.stat.exists is defined
- debug: msg="is_atomic={{ is_atomic }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment