Refactoring Common (Ansible) Provisioner Configs

22 views
Skip to first unread message

Jamie Jackson

unread,
Oct 15, 2020, 3:03:37 PM10/15/20
to vagra...@googlegroups.com
I have a few Ansible provisioners and I'd like to have some common configs apply to them all.

This isn't the right way to do it, apparently: https://gist.github.com/jamiejackson/b4f3593417e708d1908ae023275715ea

Is there a way?

Thanks,
Jamie

 

dnmo...@gmail.com

unread,
Oct 16, 2020, 6:21:33 AM10/16/20
to Vagrant

You're probably looking to merge two hashes To do this in Ruby


hash3 = hash1.merge(hash2)

Jamie Jackson

unread,
Oct 16, 2020, 10:49:48 AM10/16/20
to vagra...@googlegroups.com
Thanks, but did you see the linked gist? That's what I tried but it doesn't work. `ansible` is some kind of config object and not a hash.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/vagrant/issues
Discuss: https://discuss.hashicorp.com/c/vagrant/24
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/b819a5b5-e710-47f2-8c5f-487c39a24e3cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages