Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: all
- tasks:
- - name: Check run-level
- shell: /bin/systemctl get-default
- register: runlev
- - name: Debug stdout capture
- debug: msg=`{{ runlev.stdout | to_nice_yaml }}`
- when: ansible_distribution_major_version == '7'
- ignore_errors: yes
Advertisement
Add Comment
Please, Sign In to add comment