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

rc 12. Invalid Keyword for task: DEFINE ALIAS #214

Open
ziosstaff opened this issue May 15, 2023 · 1 comment
Open

rc 12. Invalid Keyword for task: DEFINE ALIAS #214

ziosstaff opened this issue May 15, 2023 · 1 comment
Assignees
Labels
Status: In Progress This issue is under review by a team member.

Comments

@ziosstaff
Copy link

Describe the bug
when using the role: add-zos-user, task: DEFINE ALIAS, receive the following error (note: xxx out some fields for security):
TASK [add-zos-user : Define alias for user ID] ******************************************
fatal: [xxxx-hostname-xxxx]: FAILED! => {"changed": false, "msg": "The TSO command "DEFINE ALIAS ( NAME('SY@ANSZ1') RELATE('ICFCVOL.VXXXXXX') ) CATALOG('SYS1.MCAT.XXXXX.XXXXXX')\n" execution failed.", "output": [{"command": "DEFINE ALIAS ( NAME('SY@ANSZ1') RELATE('ICFCVOL.VXXXXXX') ) CATALOG('SYS1.MCAT.XXXXX.XXXXXX')\n", "content": ["IKJ56712I INVALID KEYWORD, ", "", "IDC0014I LASTCC=12", ""], "lines": 4, "rc": 12}]}

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'role 'add-zos-user''
  2. Define a user-catalog and master-catalog for new alias in roles/add-zos-user/defaults/main.yml
  3. run playbook add-zos-user
  4. See error as noted above: ["IKJ56712I INVALID KEYWORD, ", "", "IDC0014I LASTCC=12", ""], "lines": 4, "rc": 12}]}

Expected behavior
rc 0, with successful alias defined

Screenshots
when using the role: add-zos-user, task: DEFINE ALIAS, receive the following error (note: xxx out some fields for security):
TASK [add-zos-user : Define alias for user ID] ******************************************
fatal: [xxxx-hostname-xxxx]: FAILED! => {"changed": false, "msg": "The TSO command "DEFINE ALIAS ( NAME('SY@ANSZ1') RELATE('ICFCVOL.VXXXXXX') ) CATALOG('SYS1.MCAT.XXXXX.XXXXXX')\n" execution failed.", "output": [{"command": "DEFINE ALIAS ( NAME('SY@ANSZ1') RELATE('ICFCVOL.VXXXXXX') ) CATALOG('SYS1.MCAT.XXXXX.XXXXXX')\n", "content": ["IKJ56712I INVALID KEYWORD, ", "", "IDC0014I LASTCC=12", ""], "lines": 4, "rc": 12}]}
Additional context
n/a

@itsBryantP
Copy link
Member

Hi,

I am unable to replicate the issue with the add-zos-user role and add-user.j2 template as they are.

The issue can only be replicated with manual insertion of new line characters in either the role or template as so.

.../roles/add-zos-user/tasks/main.yml

- name: Define alias for user ID
  ibm.ibm_zos_core.zos_tso_command:
    commands: "{{ lookup('template', '../templates/define-alias.j2') }}
    
    "

.../roles/add-zos-user/templates/define-alias.j2
image

can you please confirm that all newline characters in these 2 areas have been removed?

@itsBryantP itsBryantP added the Status: In Progress This issue is under review by a team member. label Jul 19, 2023
@itsBryantP itsBryantP self-assigned this Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In Progress This issue is under review by a team member.
Projects
None yet
Development

No branches or pull requests

2 participants