How to find vars: grep ansible_ * -r | egrep -v "(facts|become|user|host|limit|check_mode|python|ssh|connection|min_|managed|ceph_ansible|verbos|hieradata|job|_home|_log|loop|async|limit|filter|_version|calling_|_inventory|\.py|group_vars|diff_mode)" | grep ansible_
bulk fix vars: # THT for DIR in common deployment; do # tripleo-ansible #for DIR in tripleo_ansible/roles; do find $DIR -type f | xargs sed -i \ -e "s/ansible_hostname\([\ |\.]\)/ansible_facts['hostname']\1/g" \ -e "s/ansible_fqdn\([\ |\.]\)/ansible_facts['fqdn']\1/g" \ -e "s/ansible_nodename\([\ |\.]\)/ansible_facts['nodename']\1/g" \ -e "s/ansible_distribution\([\ |\.]\)/ansible_facts['distribution']\1/g" \ -e "s/ansible_distribution_version\([\ |\.]\)/ansible_facts['distribution_version']\1/g" \ -e "s/ansible_distribution_major_version\([\ |\.]\)/ansible_facts['distribution_major_version']\1/g" \ -e "s/ansible_os_family\([\ |\.]\)/ansible_facts['os_family']\1/g" \ -e "s/ansible_devices\([\ |\.]\)/ansible_facts['devices']\1/g" done
How to find vars: become| user|host| limit|check_ mode|python| ssh|connection| min_|managed| ceph_ansible| verbos| hieradata| job|_home| _log|loop| async|limit| filter| _version| calling_ |_inventory| \.py|group_ vars|diff_ mode)" | grep ansible_
grep ansible_ * -r | egrep -v "(facts|
bulk fix vars: ansible/ roles; do hostname\ ([\ |\.]\)/ ansible_ facts[' hostname' ]\1/g" \ ansible_ facts[' fqdn']\ 1/g" \ nodename\ ([\ |\.]\)/ ansible_ facts[' nodename' ]\1/g" \ distribution\ ([\ |\.]\)/ ansible_ facts[' distribution' ]\1/g" \ distribution_ version\ ([\ |\.]\)/ ansible_ facts[' distribution_ version' ]\1/g" \ distribution_ major_version\ ([\ |\.]\)/ ansible_ facts[' distribution_ major_version' ]\1/g" \ os_family\ ([\ |\.]\)/ ansible_ facts[' os_family' ]\1/g" \ devices\ ([\ |\.]\)/ ansible_ facts[' devices' ]\1/g"
# THT
for DIR in common deployment; do
# tripleo-ansible
#for DIR in tripleo_
find $DIR -type f | xargs sed -i \
-e "s/ansible_
-e "s/ansible_fqdn\([\ |\.]\)/
-e "s/ansible_
-e "s/ansible_
-e "s/ansible_
-e "s/ansible_
-e "s/ansible_
-e "s/ansible_
done