Correct way of license file management in Ansible?

62 views
Skip to first unread message

Vincent Hardion

unread,
Aug 14, 2014, 5:03:16 PM8/14/14
to ansible...@googlegroups.com
Hi,

I want to manage the license file (the license key of proprietary software) within Ansible for each host.
There is few resource on the web on this subject or maybe I use the wrong vocabulary.

So can someone tell me if there is a better ansible way to handle this case.
Here is what is working at this moment:

*roles/license/tasks/main.yml:
---
- debug: var=file
- copy: src={{ file }} dest=/var/license.lic

*roles/license/defaults/main.yml:
---
file: host_files/{{ inventory_hostname }}/license.lic

*hosts:

127.0.0.1

The license file for each host is kept in the arbitrary directory 'host_files', like:

host_files/127.0.0.1/license.lic

Thank in advance for your advice,

Vincent


Michael DeHaan

unread,
Aug 16, 2014, 10:28:42 AM8/16/14
to ansible...@googlegroups.com
This looks like an *excellent* way to do it if they are going to vary by host.






--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/82ea249b-d0f4-4353-a32b-ff6e25fa18af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages