Hi Anand As I told you (twice) before, those oracle modules are NOT part of the ansible distribution. Please get support with the authors of those modules. I see that you’ve done that:
https://github.com/oravirt/ansible-oracle-modules/issues So, please don’t cross post questions regarding those modules to this list. Thx ! On Tue, 28 Jan 2020 at 15:23, Anand Solomon <[email protected]> wrote: > Hi, > > I am running the below playbook and I am getting errors when having > 'state: absent', but when I have 'present', it works fine. > > > tasks: > > - name: This playbook will create the user. > > oracle_grants: > > user: "{{user}}" > > password: "{{password}}" > > service_name: "{{sname}}" > > port: "{{prt}}" > > hostname: "{{hostname}}" > > schema: TSTSCH > > # grants: "'DBA','create session','create any > table',connect,resource" > > grants: 'create session' > > state: absent > > environment: "{{oracle_env}}" > > register: user_grants > > delegate_to: localhost > > > > > I am getting the below error > > The full traceback is: > Traceback (most recent call last): > File > "/home/ansible/.ansible/tmp/ansible-tmp-1580220579.04-228603469188212/AnsiballZ_oracle_grants", > line 102, in > _ansiballz_main() > File > "/home/ansible/.ansible/tmp/ansible-tmp-1580220579.04-228603469188212/AnsiballZ_oracle_grants", > line 94, in _ansiballz_main > invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) > File > "/home/ansible/.ansible/tmp/ansible-tmp-1580220579.04-228603469188212/AnsiballZ_oracle_grants", > line 40, in invoke_module > runpy.run_module(mod_name='ansible.modules.oracle_grants', > init_globals=None, run_name='main', alter_sys=True) > File "/usr/lib64/python2.7/runpy.py", line 176, in run_module > fname, loader, pkg_name) > File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code > mod_name, mod_fname, mod_loader, pkg_name) > File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code > exec code in run_globals > File > "/tmp/ansible_oracle_grants_payload_GK4fah/ansible_oracle_grants_payload.zip/ansible/modules/oracle_grants.py", > line 673, in > File > "/tmp/ansible_oracle_grants_payload_GK4fah/ansible_oracle_grants_payload.zip/ansible/modules/oracle_grants.py", > line 646, in main > TypeError: remove_grants() takes exactly 7 arguments (6 given) > > fatal: [22.174.101.30 -> localhost]: FAILED! => { > "changed": false, > "module_stderr": "Traceback (most recent call last):\n File > "/home/ansible/.ansible/tmp/ansible-tmp-1580220579.04-228603469188212/AnsiballZ_oracle_grants", > line 102, in \n _ansiballz_main()\n File > "/home/ansible/.ansible/tmp/ansible-tmp-1580220579.04-228603469188212/AnsiballZ_oracle_grants", > line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, > ANSIBALLZ_PARAMS)\n File > "/home/ansible/.ansible/tmp/ansible-tmp-1580220579.04-228603469188212/AnsiballZ_oracle_grants", > line 40, in invoke_module\n > runpy.run_module(mod_name='ansible.modules.oracle_grants', > init_globals=None, run_name='main', alter_sys=True)\n File > "/usr/lib64/python2.7/runpy.py", line 176, in run_module\n fname, loader, > pkg_name)\n File "/usr/lib64/python2.7/runpy.py", line 82, in > _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File > "/usr/lib64/python2.7/runpy.py", line 72, in _run_code\n exec code in > run_globals\n File > "/tmp/ansible_oracle_grants_payload_GK4fah/ansible_oracle_grants_payload.zip/ansible/modules/oracle_grants.py", > line 673, in \n File > "/tmp/ansible_oracle_grants_payload_GK4fah/ansible_oracle_grants_payload.zip/ansible/modules/oracle_grants.py", > line 646, in main\nTypeError: remove_grants() takes exactly 7 arguments (6 > given)\n", > "module_stdout": "", > "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", > "rc": 1 > } > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/b597c7c3-37b3-475a-bc25-420ab0519830%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/b597c7c3-37b3-475a-bc25-420ab0519830%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Sent from a mobile device - please excuse the brevity, spelling and punctuation. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwMkmqMQJ_tGZVwrFSBoN79eoX22XecxHN2Gb0%3DcbwZuKA%40mail.gmail.com.
