ibm-spectrum-scale-install-infra icon indicating copy to clipboard operation
ibm-spectrum-scale-install-infra copied to clipboard

Problem handling multi-value parameters

Open pekackif opened this issue 3 years ago • 0 comments

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.

pekackif avatar Apr 11 '22 12:04 pekackif