Good morning,
Before I consider raising a bug report for this, would be good to know if this works for anyone else. This Ansible stanza (have tried different quoting as well):
- name: Add service to inittab
when: ansible_os_family == "AIX"
ibm.power_aix.inittab:
name: service
runlevel: "2"
action: once
command: "/home/service/agent start >/dev/console 2>&1"
insertafter: ctrmc
state: present
become: yes
fails with:
fatal: [server]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"action": "once",
"command": "/home/service/agent start >/dev/console 2>&1",
"insertafter": "ctrmc",
"name": "service",
"runlevel": "2",
"state": "present"
}
},
"msg": "\\nFailed to create entry in inittab file: service",
"rc": 1,
"stderr": "mkitab: 0481-203 Cannot specify more than one parameter.\\nUsage:\\tmkitab [-i ident] \\"ident:runlevel:action:command\\"\\n",
"stderr_lines": [
"mkitab: 0481-203 Cannot specify more than one parameter.",
"Usage:\\tmkitab [-i ident] \\"ident:runlevel:action:command\\""
],
"stdout": "",
"stdout_lines": []
Regards,
Henrik Morsing
------------------------------
Henrik Morsing
------------------------------