Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organization parameter required setting Intersight policies #48

Open
nunocarrulo opened this issue Mar 9, 2021 · 0 comments
Open

Organization parameter required setting Intersight policies #48

nunocarrulo opened this issue Mar 9, 2021 · 0 comments

Comments

@nunocarrulo
Copy link

nunocarrulo commented Mar 9, 2021

Hello team,
I believe the playbooks and roles require an adjustment to include the 'Organization' from Intersight without which the playbook will fail to deploy the policies on Intersight.

To address this 2 adjustments were made:
Collect the organization from a name to a var 'organization' (maybe a role can be created for that)

# Obtain Organization
- name: "Get Organization {{ org_name }}"
  vars:
    api_info: &api_info
      api_private_key: "{{ api_private_key }}"
      api_key_id: "{{ api_key_id }}"
      api_uri: "{{ api_uri | default(omit) }}"
      validate_certs: "{{ validate_certs | default(omit) }}"
      state: "{{ state | default(omit) }}"
  intersight_rest_api:
    <<: *api_info
    resource_path: /organization/Organizations
    query_params:
      $filter: "Name eq '{{ org_name }}'"
    api_body: {}
  register: organization
  tags: ['org']

Then in the required roles, "api_body" was adjusted to include the intended organization:
"Organization":"{{ organization.api_response.Moid }}",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant