-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Closed
Labels
affects_2.8This issue/PR affects Ansible v2.8This issue/PR affects Ansible v2.8aixAIX communityAIX communitybot_closedbugThis issue/PR relates to a bug.This issue/PR relates to a bug.collectionRelated to Ansible Collections workRelated to Ansible Collections workcollection:community.generalhas_prThis issue has an associated PR.This issue has an associated PR.moduleThis issue/PR relates to a module.This issue/PR relates to a module.needs_collection_redirecthttps://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.mdhttps://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.mdsupport:communityThis issue/PR relates to code supported by the Ansible community.This issue/PR relates to code supported by the Ansible community.systemSystem categorySystem category
Description
SUMMARY
Trying to remove an adapter, it returns error in command syntax.
ISSUE TYPE
- Bug Report
COMPONENT NAME
aix_devices.py
ANSIBLE VERSION
ansible 2.8.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/tvt.ramoon.camacho/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/tvt.ramoon.camacho/ansible/lib/ansible
executable location = /home/tvt.ramoon.camacho/ansible/bin/ansible
python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
CONFIGURATION
DEFAULT_REMOTE_USER(/etc/ansible/ansible.cfg) = testuser
DEPRECATION_WARNINGS(/etc/ansible/ansible.cfg) = False
OS / ENVIRONMENT
Tests performed in AIX 7.1 environment
STEPS TO REPRODUCE
Playbook example:
[testuser@controller ansible]$ cat aix_dev.yaml
---
- name: Testing
hosts: testeram
become: yes
tasks:
- name: Removes fcs0.
aix_devices:
device: fcs0
state: removed
recursive: yes
[testuser@controller ansible]$
Running the playbook:
[testuser@controller ansible]$ ansible-playbook aix_dev.yaml
PLAY [Testing] *********************************************************************************************************************************************************
TASK [Gathering Facts] *************************************************************************************************************************************************
ok: [testeram]
TASK [Removes fcs0.] ***************************************************************************************************************************************************
fatal: [testeram]: FAILED! => {"changed": false, "err": "rmdev: 0514-500 Usage error - \n\nUsage:\nrmdev {-l|-p} Name [-d|-S][-R][-q][-f File][-g]\nrmdev -h\n\n", "msg": "Failed to run rmdev", "rc": 1}
to retry, use: --limit @/home/testuser/ansible/aix_dev.retry
PLAY RECAP *************************************************************************************************************************************************************
testeram : ok=1 changed=0 unreachable=0 failed=1 skipped=0
[testuser@controller ansible]$
I saw it's trying to execute "/usr/sbin/rmdev -l fcs0 -R ''", and doing the same at the operating system, it returns error:
testuser@testeram(/home/testuser)# sudo /usr/sbin/rmdev -l fcs0 -R ''
rmdev: 0514-500 Usage error -
Usage:
rmdev {-l|-p} Name [-d|-S][-R][-q][-f File][-g]
rmdev -h
testuser@testeram(/home/testuser)#
If I do the same with no single quotation marks, it runs correctly:
testuser@testeram(/home/testuser)# sudo /usr/sbin/rmdev -l fcs0 -R
sfwcomm0 Defined
fscsi0 Defined
fcs0 Defined
testuser@testeram(/home/testuser)#
EXPECTED RESULTS
It was expected the device be removed.
ACTUAL RESULTS
It returns error in command syntax.
Metadata
Metadata
Assignees
Labels
affects_2.8This issue/PR affects Ansible v2.8This issue/PR affects Ansible v2.8aixAIX communityAIX communitybot_closedbugThis issue/PR relates to a bug.This issue/PR relates to a bug.collectionRelated to Ansible Collections workRelated to Ansible Collections workcollection:community.generalhas_prThis issue has an associated PR.This issue has an associated PR.moduleThis issue/PR relates to a module.This issue/PR relates to a module.needs_collection_redirecthttps://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.mdhttps://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.mdsupport:communityThis issue/PR relates to code supported by the Ansible community.This issue/PR relates to code supported by the Ansible community.systemSystem categorySystem category