Skip to content

Problem handling multi-value parameters #622

Open
@pekackif

Description

@pekackif

Describe the bug
Problem handling multi-value parameters, like i.e:

failed: [n001] (item=[{'nodeclass': 'GPFSclients'}, {'verbsPorts': 'mlx5_0 mlx5_1'}]) => changed=true 
  ansible_loop_var: item
  cmd:
  - /usr/lpp/mmfs/bin/mmchconfig
  - verbsPorts=mlx5_0
  - mlx5_1
  - -N
  - GPFSclients
  delta: '0:00:00.411459'
  end: '2022-04-11 12:07:12.288362'
  item:
  - nodeclass: GPFSclients
  - verbsPorts: mlx5_0 mlx5_1
  msg: non-zero return code
  rc: 1
  start: '2022-04-11 12:07:11.876903'
  stderr: |-
    mmchconfig: Incorrect extra argument: -N
    Usage:
      mmchconfig Attribute=value[,Attribute=value...] [-i | -I]
                   [-N {Node[,Node...] | NodeFile | NodeClass}]
  stderr_lines: <omitted>
  stdout: ''

Issue comes from here:
https://github.com/IBM/ibm-spectrum-scale-install-infra/blob/dev/roles/core/cluster/tasks/config.yml#L77

Proposed line:

current_value: "{{ item.1[current_key] | string | regex_replace('True', 'yes') | regex_replace('False', 'no') | quote }}"

To Reproduce
Steps to reproduce the behavior:

  1. ...

Expected behavior
A clear and concise description of what you expected to happen.

Environment
Please run the following an paste your output here:

# Developement
ansible --version 
python --version 

# Deployment
rpm -qa | grep gpfs

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions