files in group_vars?

15 views
Skip to first unread message

jepper

unread,
Feb 8, 2016, 11:04:44 AM2/8/16
to Ansible Project
Problem: 
We want a simple nginx role that can be re-used in different ways, i.e. not serving same purpose, and with entirely unrelated files in /etc/nginx/conf.d/

Can we use files as if they were in roles/nginx/files but instead the files are read from group_vars in a way that correspond with inventory/env and group_vars/env? The idea being to decouple the files from the role... Thanks

David Negreira

unread,
Feb 8, 2016, 12:47:40 PM2/8/16
to Ansible Project
You can use the template module to build up your nginx configuration files from variables
Reply all
Reply to author
Forward
0 new messages