问题描述
我想从 S3 中的存储桶下载一些内容。我尝试在 Windows 机器上使用 aws_s3 模块。这是任务:
- name: Copy Install-Files to D:\Programme\Installation
aws_s3:
bucket: "{{ bucket }}"
object: /path/to/folder
dest: D:\Programme\Installation
mode: get
我收到以下错误:
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:13 char:27\r\n+ except (AttributeError,OSError):\r\n+ ~\r\nMissing argument in parameter list.\r\nAt line:15 char:7\r\n+ if scriptdir is not None:\r\n+ ~\r\nMissing '(' after 'if' in if statement.\r\nAt line:22 char:7\r\n+ if sys.version_info < (3,):\r\n+ ~\r\nMissing '(' after 'if' in if statement.\r\nAt line:22 char:30\r\n+ if sys.version_info < (3,):\r\n+ ~\r\nMissing expression after ','.\r\nAt line:22 char:25\r\n+ if sys.version_info < (3,):\r\n+ ~\r\nThe '<' operator is reserved for future use.\r\nAt line:24 char:32\r\n+ MOD_DESC = ('.py','U',imp.PY_SOURCE)\r\n+ ~\r\nMissing expression after ','.\r\nAt line:24 char:33\r\n+ MOD_DESC = ('.py',imp.PY_SOURCE)\r\n+ ~~~~~~~~~~~~~\r\nUnexpected token 'imp.PY_SOURCE' in expression or statement.\r\nAt line:24 char:32\r\n+ MOD_DESC = ('.py',imp.PY_SOURCE)\r\n+ ~\r\nMissing closing ')' in expression.\r\nAt line:24 char:46\r\n+ MOD_DESC = ('.py',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 "
难道这个模块只适用于Linux机器?如果是这种情况,我可以为 Windows 特定机器使用哪些其他模块?我还看到有一个 win_s3 模块,但我没有找到有关该模块的任何文档,当我尝试使用它时,出现以下错误:
"reason": "no action detected in task. This often indicates a misspelled module name,or incorrect module path.\n\nThe error appears to be in '/tmp/awx_22514_j6sz2lyr/project/roles/other_roles/ext/ext_monitoring_beats/tasks/windows.yml': line 8,column 3,but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Copy Install-Files to D:\\Programme\\Installation\n ^ here\n
我怎样才能做到这一点?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)