robert3t

broken ansible display run level

Apr 9th, 2019
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. ---
  2. - hosts: OL7 # changed from all when testing
  3. become: true
  4. tasks:
  5. - name: Check run-level
  6. shell: /bin/systemctl get-default
  7. register: runlev
  8. - name: Debug stdout capture
  9. debug: msg=`{{ runlev | to_nice_yaml }}`
  10. when: ansible_distribution_version == '7'
  11. ignore_errors: True
Advertisement
Add Comment
Please, Sign In to add comment