mirror of https://github.com/ansible/ansible.git
* Make sure ansible_become treated as a boolean
(cherry picked from commit 8aca464b8b
)
pull/70714/head
parent
a5c0b11913
commit
94a81f7b44
@ -0,0 +1,3 @@
|
||||
bugfixes:
|
||||
- The `ansible_become` value was not being treated as a boolean value when set in an INI format
|
||||
inventory file (fixes bug https://github.com/ansible/ansible/issues/70476).
|
@ -0,0 +1 @@
|
||||
shippable/posix/group5
|
@ -0,0 +1,5 @@
|
||||
[local]
|
||||
testhost ansible_connection=local ansible_become=no ansible_become_user=ansibletest1
|
||||
|
||||
[all:vars]
|
||||
ansible_python_interpreter="{{ ansible_playbook_python }}"
|
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
ansible-playbook -v -i inventory.ini test_ansible_become.yml
|
@ -0,0 +1,11 @@
|
||||
- hosts: testhost
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- name: Test proper bool evaluation of ansible_become (issue #70476)
|
||||
shell: whoami
|
||||
register: output
|
||||
|
||||
- name: Assert we are NOT the become user specified
|
||||
assert:
|
||||
that:
|
||||
- "output.stdout != 'ansibletest1'"
|
Loading…
Reference in New Issue