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

Problem handling multi-value parameters #622

Open
pekackif opened this issue Apr 11, 2022 · 0 comments
Open

Problem handling multi-value parameters #622

pekackif opened this issue Apr 11, 2022 · 0 comments

Comments

@pekackif
Copy link

pekackif commented Apr 11, 2022

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.

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