# How to globally configure the ansible provisioner?

**URL:** <https://discuss.hashicorp.com/t/how-to-globally-configure-the-ansible-provisioner/29708>\
**Category:** Packer\
**Created:** [September 20, 2021, 10:13pm UTC](https://discuss.hashicorp.com/t/how-to-globally-configure-the-ansible-provisioner/29708 "2021-09-20T22:13:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh.m.sharpe](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/josh.m.sharpe/32/18611_2.png) [@josh.m.sharpe](https://discuss.hashicorp.com/u/josh.m.sharpe)\
**Post date:** [September 20, 2021, 10:13pm UTC](https://discuss.hashicorp.com/t/how-to-globally-configure-the-ansible-provisioner/29708/1 "2021-09-20T22:13:29Z")

</div>

I want to set this ansible config option globally:  
`scp_if_ssh=True`

I know that I can set it every place I call an ansible provisioner with something like:  
`"ansible_env_vars": ["scp_if_ssh=True"],`

…but then my build files will be littered with that configuration. How can I set that config globally? I tried putting it in the global ansible config file: `~/.ansible.cfg` - but that doesn’t appear to have any effect.
