Re: [ansible-project] Error using state: absent in oracle_grant module

7 views
Skip to first unread message
Message has been deleted

Dick Visser

unread,
Jan 28, 2020, 11:03:26 AM1/28/20
to ansible...@googlegroups.com
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:

So, please don’t cross post questions regarding those modules to this list. 

Thx !

On Tue, 28 Jan 2020 at 15:23, Anand Solomon <anand.v...@gmail.com> 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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b597c7c3-37b3-475a-bc25-420ab0519830%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

Anand Solomon

unread,
Jan 29, 2020, 10:44:58 PM1/29/20
to Ansible Project
Thanks very much.


On Tuesday, January 28, 2020 at 11:03:26 AM UTC-5, Dick Visser wrote:
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:

So, please don’t cross post questions regarding those modules to this list. 

Thx !
To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages