Skip to content

Instantly share code, notes, and snippets.

@hostmaster
Created March 6, 2014 08:53
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 hostmaster/9385643 to your computer and use it in GitHub Desktop.
Save hostmaster/9385643 to your computer and use it in GitHub Desktop.
---
- hosts: build-servers
remote_user: root
tasks:
- name: read lines
command: tail -n 10 /var/log/messages
register: logfile
- name: print
debug: msg="LINE {{ item }}"
with_items: logfile.stdout_lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment