How to get variables from ansible result
问题 I have a shell script whose output is an echo of the following format <variable_1>;<variable_2>;<variable_3> etc I want to use these variables and run a mysql query to update a DB like so mysql -u<user> -p<password> -h<host> -e'insert into test_table values ("variable_1","variable_2","variable_3")' My ansible playbook looks like this. --- - hosts: infoServers sudo: yes gather_facts: no tasks: - name: gather info script: get_hostdata.sh register: result - name: print result local_action: