os_security_group_rule by project

26 views
Skip to first unread message

Thomas King

unread,
Dec 7, 2016, 3:44:04 PM12/7/16
to Ansible Project
I am building an Ansible playbook to create a new project, add a user role, work with security groups, and other new-project tasks. The playbook creates a project after asking for some input and would need to continue working on that project through the remaining tasks. 

The os_security_group_rule module documentation states the project name or ID should either be in the auth dictionary or in the cloud file. The cloud file isn't feasible unless I wrap the entire playbook in a Python script. 

This may be due to my own ignorance about Ansible - is there a better way to add the project name or project ID to the playbook, such as 'project_name: {{ variable }}' ? Or is this module not coded to pass this information in as an option? 

The module documentation has no such option directly. 

If there is no such option, can I add the project_name to auth: without the other dictionary objects since I use a cloud file? 

Thomas King

unread,
Dec 15, 2016, 4:54:02 PM12/15/16
to Ansible Project
Figured it out:
      auth:
        project_name: "{{ projname }}"
Reply all
Reply to author
Forward
0 new messages