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

Role search_mapping_rule giving errors #203

Open
daniew01 opened this issue May 25, 2022 · 1 comment
Open

Role search_mapping_rule giving errors #203

daniew01 opened this issue May 25, 2022 · 1 comment

Comments

@daniew01
Copy link

Hi

We are having issue working with the above mentioned role. If we call it in its current state with the "{{..}}" it FAILED with "Invalid variable name in 'register' specified" message.

If we change the role and remove the "{{ }}" there is no failures as shown below.
I saw the reason for creating the "{{ }}" when reading this article : #24 (comment), and I am not sure if this is a bug or if I am using the role incorrect and would like some guidance here please.

Are there any other way we can search and use the rule when creating a STS?

Kind Regards
DJW

Extract from our yml file :

#----------------------------------------------------------------------
#Find the ID of the newly created mapping rule
#----------------------------------------------------------------------
- role: search_mapping_rule
search_mapping_rule_name: DJW_MobimoneyPortalAccessManagement

Role: search_mapping_rule:

  • name: Search for a Mapping Rule
    isam:
    appliance: "{{ inventory_hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    lmi_port: "{{ lmi_port }}"
    log: "{{ log_level }}"
    force: "{{ force }}"
    action: ibmsecurity.isam.aac.mapping_rules.search
    isamapi:
    name: "{{ search_mapping_rule_name }}"
    when: search_mapping_rule_name is defined
    #register: "{{ search_mapping_rule_register }}"
    register: search_mapping_rule_register

Output for : register: "{{ search_mapping_rule_register }}"
TASK [search_mapping_rule : Search for a Mapping Rule] *************************
fatal: [nbpisamiddev5]: FAILED! => {"msg": "Invalid variable name in 'register' specified: '{{ search_mapping_rule_register }}'"}

Output for : register: search_mapping_rule_register
TASK [search_mapping_rule : Search for a Mapping Rule] *************************
ok: [nbpisamiddev5] => {"ansible_facts": {"activations": ["wga", "mga", "federation"], "firmware_build": "20210610-0034", "firmware_label": "isva_10.0.2.0_20210610-0034", "model": "Appliance", "product_description": "IBM Security Verify Access", "product_name": "isva", "version": "10.0.2.0"}, "changed": fa........

@djorgen-ibm
Copy link
Contributor

I don't think it should have {{ }} for register.

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

2 participants