More Ansible Tower - create an inventory group

35 views
Skip to first unread message

Peter Mooshammer

unread,
Jun 14, 2016, 1:30:01 AM6/14/16
to Ansible Project
Hello,

Is there a way to create a new inventory group other than through the UI?

thanks

Peter

Abhishek R.

unread,
Jun 15, 2016, 7:58:31 AM6/15/16
to Ansible Project
You can create run-time, in-memory, ad-hoc groups using the group-by module in a playbook - http://docs.ansible.com/ansible/group_by_module.html.

Though this wouldn't modify the actual inventory file itself. The groups will be available only during the playbook run itself. Perhaps you can add tasks in the playbook for updating the chosen groups in the inventory file well..

Regards

Peter Mooshammer

unread,
Jun 15, 2016, 12:49:36 PM6/15/16
to Ansible Project
Hello 

thanks for the reply,

I knew about the in-memory thing. It seems like I need to do something with the tower-cli in order to create a inventory.

Peter
Reply all
Reply to author
Forward
0 new messages