Use sudo for role testing
There are 2 ways to realize the privilege escalation needed for the gate jobs. 1) Editing the playbooks (and hope to not forget to write the sudo/become lines for every role) 2) Editing the inventory and set the variable there. I'm taking the second approach with the minimum set of variables (become_method is sudo by default and become_user is root by default). Change-Id: I54b8c1489bfc46d4a03c907f4a86f0313c7778ff
This commit is contained in:
parent
335b5be62c
commit
82f0126248
|
@ -1,3 +1,3 @@
|
|||
[defaults]
|
||||
roles_path = ../../
|
||||
|
||||
remote_tmp = ../.ansible/tmp/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[all]
|
||||
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local
|
||||
test1 ansible_ssh_host=127.111.111.101
|
||||
test2 ansible_ssh_host=127.111.111.102
|
||||
localhost ansible_ssh_host=127.0.0.1 ansible_connection=local ansible_become=True
|
||||
test1 ansible_ssh_host=127.111.111.101 ansible_become=True
|
||||
test2 ansible_ssh_host=127.111.111.102 ansible_become=True
|
||||
|
||||
[all_containers]
|
||||
test1
|
||||
|
|
Loading…
Reference in New Issue