intersight-ansible icon indicating copy to clipboard operation
intersight-ansible copied to clipboard

Organization parameter required setting Intersight policies

Open nunocarrulo opened this issue 3 years ago • 0 comments

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 }}",

nunocarrulo avatar Mar 09 '21 11:03 nunocarrulo