summaryrefslogtreecommitdiffstats
path: root/jenkins_jobs
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-05-26 12:11:22 +0000
committerGerrit Code Review <review@openstack.org>2020-05-26 12:11:22 +0000
commit1ffef886f872dc74a5d6bb2dcc49e302f85018bb (patch)
tree1f7140163360d030039921e0f062d37e1ef0e142 /jenkins_jobs
parent2b238d656df69641b377c243d991c7f20d4e1c6d (diff)
parentd8fa4f41269356ad85bd6d80d253bb5494d82bc9 (diff)
downloadpython-jenkins-job-builder-1ffef886f872dc74a5d6bb2dcc49e302f85018bb.tar.gz
python-jenkins-job-builder-1ffef886f872dc74a5d6bb2dcc49e302f85018bb.tar.xz
python-jenkins-job-builder-1ffef886f872dc74a5d6bb2dcc49e302f85018bb.zip
Merge "Introduce disable-host-key-checking for builder ansible-playbook"
Diffstat (limited to 'jenkins_jobs')
-rw-r--r--jenkins_jobs/modules/builders.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/jenkins_jobs/modules/builders.py b/jenkins_jobs/modules/builders.py
index 248ad90d..e26f98bb 100644
--- a/jenkins_jobs/modules/builders.py
+++ b/jenkins_jobs/modules/builders.py
@@ -4445,8 +4445,8 @@ def ansible_playbook(parser, xml_parent, data):
(default true)
:arg bool colorized-output: Check this box to allow ansible to render ANSI
color codes in the Jenkins console. (default false)
- :arg bool host-key-checking: Check this box to enforce the validation of
- the hosts SSH server keys. (default false)
+ :arg bool disable-host-key-checking: Check this box to disable the
+ validation of the hosts SSH server keys. (>= 1.0) (default false)
:arg str additional-parameters: Any additional parameters to pass to the
ansible command. (default '')
:arg list variables: List of extra variables to be passed to ansible.
@@ -4457,6 +4457,12 @@ def ansible_playbook(parser, xml_parent, data):
* **value** (`str`) -- Desired value (default '')
* **hidden** (`bool`) -- Hide variable in build log (default false)
+ Outdated Options for versions >= 1.0 of plugin:
+
+ :arg bool host-key-checking: Outdated, replaced with disable-host-key-checking.
+ Check this box to enforce the validation of the hosts SSH server keys.
+ (< 1.0) (default true)
+
Example:
.. literalinclude::
@@ -4468,6 +4474,12 @@ def ansible_playbook(parser, xml_parent, data):
.. literalinclude::
/../../tests/builders/fixtures/ansible-playbook002.yaml
:language: yaml
+
+ Example(s) versions < 1.0:
+
+ .. literalinclude::
+ /../../tests/builders/fixtures/ansible-playbook005.yaml
+ :language: yaml
"""
plugin = XML.SubElement(
xml_parent, "org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder"
@@ -4528,8 +4540,11 @@ def ansible_playbook(parser, xml_parent, data):
XML.SubElement(plugin, "colorizedOutput").text = str(
data.get("colorized-output", False)
).lower()
+ XML.SubElement(plugin, "disableHostKeyChecking").text = str(
+ data.get("disable-host-key-checking", False)
+ ).lower()
XML.SubElement(plugin, "hostKeyChecking").text = str(
- data.get("host-key-checking", False)
+ data.get("host-key-checking", True)
).lower()
XML.SubElement(plugin, "additionalParameters").text = str(
data.get("additional-parameters", "")