Skip to content

Commit 40a4ada

Browse files
authored
use a login shell when using become for bats
otherwise the puppet path (/opt/puppetlabs/bin) is not loaded and tests fail to call puppetserver
1 parent d0b7ded commit 40a4ada

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

roles/bats/tasks/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
register: "test_output"
4444
ignore_errors: true
4545
environment: "{{ bats_environment }}"
46+
# Adds -i to Ansible's default
47+
become_flags: '-H -S -n -i'
4648

4749
- name: "Read results"
4850
shell: "cat {{ bats_output_dir }}/{{ item }}.tap"

0 commit comments

Comments
 (0)