Fix missing safe_args for add_host
There are a few missing commas in our sage_args, this fixes them. Otherwise we get the following error from zuul: Adding hosts ssh with ansible_password ansible_user to the inventory is prohibited Change-Id: I6162bc6a223da54af26bedd2e950ed21a64908b0 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
e557b40741
commit
c11dcc987d
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Untrusted playbooks no longer see
|
||||
'Adding hosts ssh with ansible_user to the inventory is prohibited' when
|
||||
using the add_host Ansible task on localhost.
|
|
@ -1,3 +1,7 @@
|
|||
- job:
|
||||
name: add-host
|
||||
run: playbooks/add-host.yaml
|
||||
|
||||
- job:
|
||||
parent: python27
|
||||
name: faillocal
|
||||
|
@ -12,6 +16,7 @@
|
|||
name: org/project
|
||||
check:
|
||||
jobs:
|
||||
- add-host
|
||||
- python27
|
||||
- faillocal
|
||||
- check-vars
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
- hosts: all
|
||||
tasks:
|
||||
- name: Add fake host to inventory
|
||||
add_host:
|
||||
name: fake
|
||||
ansible_connection: ssh
|
||||
ansible_host: fake.example.org
|
||||
ansible_port: 22
|
||||
ansible_user: zuul
|
||||
ansible_password: passw0rd1
|
|
@ -2238,6 +2238,9 @@ class TestAnsible(AnsibleZuulTestCase):
|
|||
build_hello = self.getJobFromHistory('hello-world')
|
||||
with self.jobLog(build_hello):
|
||||
self.assertEqual(build_hello.result, 'SUCCESS')
|
||||
build_add_host = self.getJobFromHistory('add-host')
|
||||
with self.jobLog(build_add_host):
|
||||
self.assertEqual(build_add_host.result, 'SUCCESS')
|
||||
build_python27 = self.getJobFromHistory('python27')
|
||||
with self.jobLog(build_python27):
|
||||
self.assertEqual(build_python27.result, 'SUCCESS')
|
||||
|
|
|
@ -24,10 +24,10 @@ class ActionModule(add_host.ActionModule):
|
|||
'ansible_connection',
|
||||
'ansible_host',
|
||||
'ansible_port',
|
||||
'ansible_user'
|
||||
'ansible_user',
|
||||
'ansible_password',
|
||||
'ansible_ssh_host',
|
||||
'ansible_ssh_port'
|
||||
'ansible_ssh_port',
|
||||
'ansible_ssh_user',
|
||||
'ansible_ssh_pass',
|
||||
))
|
||||
|
|
Loading…
Reference in New Issue