Closed MMirelli closed 1 year ago
@MMirelli what is the Python version, Ansible version and Pulsar version you're using? I've been using this many times without triggering an issue.
BTW, I just tested this.
hosts: localhost connection: local gather_facts: true run_once: true vars: pulsar_ver_output: "Current version of pulsar is: 2.10.1.7"
tasks:
$ ansible-playbook -i hosts_MyCluster1.ini test.yaml
PLAY [localhost] ****
TASK [Gathering Facts] ** ok: [localhost]
TASK [debug] **** ok: [localhost] => { "msg": "Current version of pulsar is: 2.10.1.7" }
TASK [debug] **** ok: [localhost] => { "msg": "2.10.1.7" }
PLAY RECAP ***
I am using the following:
ansible --version
ansible 2.9.27
python3 --version
Python 3.6.8
pulsar version
Current version of pulsar is: 2.10.1.7
Git Revision cd73e370256623fd4b7b48975b1c09b2b137a656(dirty)
Git Branch cd73e370256623fd4b7b48975b1c09b2b137a656
Built by <> on 30772e21e9ee at 2020-01-22T15:10:15+0000
I think it might be an ansible version incompatibility. What ansible version are you using?
I'm using Ansible 2.13.4. The Python version in my environment is 3.7.10.
I've had similar issues. There should be no problems taking this version. Alternatively the whole statement can be converted to python as pulsar_ver_output.stdout_lines[0].split(':')[-1].trim()
Otherwise the following error manifests