$ ansible-playbook --version
ansible-playbook 1.8 (devel 1d3a8bd39c) last updated 2014/09/18 10:33:54
(GMT -400)
Hello! This is driving me bonkers . . . can anyone see what I'm doing
wrong here?
Setting a var, which is fine:
- name: Get VBox version for installing extension pack
command: /usr/bin/VBoxManage --version
register: vbox_ver
TASK: [workstation | debug msg={{ vbox_ver.stdout }}]
*************************
ok: [localhost] => {
"msg": "4.3.10_Ubuntur93012"
}
Then trying to set a fact based on that using regex_replace:
- name: Set major/minor number of vbox release
set_fact:
vbox_ver_maj: "{{ vbox_ver.stdout | regex_replace('^(.*)_.*$','\\1') }}"
which gives me:
TASK: [workstation | debug msg={{ vbox_ver_maj }}]
****************************
ok: [localhost] => {
"msg": "\u0001"
}
when it should give me 4.3.10 . .. any thoughts would be greatly
appreciated!
Regards,
Guy
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CABnTgtWSv7hBvv1soiw1bA7S%3DGUBbL-bad%3D0gSBzxB%3DyZjH%2BNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.