find out the ansible version within ansible without shell/cmd?

44 views
Skip to first unread message

nusenu

unread,
Nov 20, 2016, 5:28:44 PM11/20/16
to ansible...@googlegroups.com
Hi,

is there a better way for this than to use shell+register?

- name: get ansible version
shell: ansible --version|head -1|cut -d" " -f2
delegate_to: 127.0.0.1
register: ansibleversion


thanks,
nusenu

signature.asc

Brian Coca

unread,
Nov 21, 2016, 5:31:49 PM11/21/16
to ansible...@googlegroups.com
use the built in:

- debug: var=ansible_version


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages