jenkins.sh
#!/bin/bash
name1='robin h h li'
age1='11'
declare -A dic
dic=(
[name1]="${name1}"
[age1]="${age1}"
)
run_icp.sh
#!/bin/bash
. jenkins.sh
name1=${dic['name1']}
age1=${dic['age1']}
ansible-playbook -i '127.0.0.01,' ../ansible-test/ansible-test/site.yml -e "ansible_ssh_user='root' ansible_ssh_pass='password' name1='${name1}' age1='${age1}'" -vvv