我是ansible的新手,我想创建一个角色来执行sql脚本。
我创建了以下目录:
playbook :
-deploy-package.yml
-roles :
-package:
-tasks:
-main.yml
...
在main.yml中:
- name: Create package
shell: echo exit |sqlplus "{{oracle_connection_chaine}}"@PKG_TEST_JENKINS.sql;
当我构建詹金斯时,出现错误:
ERROR! failed to combine variables, expected dicts but got a 'dict' and a 'AnsibleUnicode':
{}
"oracle_connection_chain = \"EXTRACTION/EXTRACTION@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST={{oracle_host}})(PORT={{oracle_port}}))(CONNECT_DATA=(SERVICE_NAME={{oracle_sn}})))'\""
FATAL: command execution failed
hudson.AbortException: Ansible playbook execution failed
at org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:262)
at org.jenkinsci.plugins.ansible.workflow.AnsiblePlaybookStep$AnsiblePlaybookExecution.run(AnsiblePlaybookStep.java:400)
at org.jenkinsci.plugins.ansible.workflow.AnsiblePlaybookStep$AnsiblePlaybookExecution.run(AnsiblePlaybookStep.java:321)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:290)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
您可以帮助解决此错误以及与该主题相关的任何文档吗?