oravirt / ansible-oracle-modules

Oracle modules for Ansible
MIT License
214 stars 159 forks source link

Getting errors when trying to create a pdb on Windows target machine #112

Open ravtechz opened 5 years ago

ravtechz commented 5 years ago

Hi,

Do the oravirt modules work on windows machines also? I have no problem with them when working on linux target machines, but on windows I get this error when trying to create a pdb:

fatal: [zeus12]: FAILED! => {"changed": false, "module_stderr": "Exception calling \"Create\" with \"1\" argument(s): \"At line:4 char:21\r\n+ def _ansiballz_main():\r\n+ ~\r\nAn expression was expected after '('.\r\nAt line:12 char:27\r\n+ except (AttributeError, OSError):\r\n+ ~\r\nMissing argument in parameter list.\r\nAt line:14 char:7\r\n+ if scriptdir is not None:\r\n+ ~\r\nMissing '(' after 'if' in if statement.\r\nAt line:21 char:7\r\n+ if sys.version_info < (3,):\r\n+ ~\r\nMissing '(' after 'if' in if statement.\r\nAt line:21 char:30\r\n+ if sys.version_info < (3,):\r\n+ ~\r\nMissing expression after ','.\r\nAt line:21 char:25\r\n+ if sys.version_info < (3,):\r\n+ ~\r\nThe '<' operator is reserved for future use.\r\nAt line:23 char:32\r\n+ MOD_DESC = ('.py', 'U', imp.PY_SOURCE)\r\n+ ~\r\nMissing expression after ','.\r\nAt line:23 char:33\r\n+ MOD_DESC = ('.py', 'U', imp.PY_SOURCE)\r\n+ ~~~~~~~~~~~~~\r\nUnexpected token 'imp.PY_SOURCE' in expression or statement.\r\nAt line:23 char:32\r\n+ MOD_DESC = ('.py', 'U', imp.PY_SOURCE)\r\n+ ~\r\nMissing closing ')' in expression.\r\nAt line:23 char:46\r\n+ MOD_DESC = ('.py', 'U', imp.PY_SOURCE)\r\n+ ~\r\nUnexpected token ')' in expression or statement.\r\nNot all parse errors were reported. Correct the reported errors and try again.\"\r\nAt line:6 char:1\r\n+ $exec_wrapper = [ScriptBlock]::Create($split_parts[0])\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : NotSpecified: (:) [], MethodInvocationException\r\n + FullyQualifiedErrorId : ParseException\r\n \r\nThe expression after '&' in a pipeline element produced an object that was not valid. It must result in a command \r\nname, a script block, or a CommandInfo object.\r\nAt line:7 char:2\r\n+ &$exec_wrapper\r\n+ ~~~~~~~~~~~~~\r\n + CategoryInfo : InvalidOperation: (:) [], RuntimeException\r\n + FullyQualifiedErrorId : BadExpression\r\n ", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

The modules are storred locally under a ./modules directory. This is how my ansible.cfg looks:

ansible@buildsrv01:/ansible/playbooks/ansible-playbooks/oracle18c_playbook_windows$ cat ansible.cfg [defaults] host_key_checking = false inventory = inventory library = ./modules

ravtechz commented 5 years ago

This is the task in the playbook:

`# Create a pluggable database #

Thanks, Razvan

ravtechz commented 5 years ago

Ansible info:

ansible@buildsrv01:/ansible/playbooks/ansible-playbooks/oracle18c_playbook_windows$ ansible --version ansible 2.7.6 config file = /ansible/playbooks/ansible-playbooks/oracle18c_playbook_windows/ansible.cfg configured module search path = [u'/ansible/playbooks/ansible-playbooks/oracle18c_playbook_windows/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible python version = 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]