Skip to content

Commit

Permalink
use a login shell when using become for bats
Browse files Browse the repository at this point in the history
otherwise the puppet path (/opt/puppetlabs/bin) is not loaded and tests
fail to call puppetserver
  • Loading branch information
evgeni authored Dec 17, 2024
1 parent d0b7ded commit 40a4ada
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/bats/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
register: "test_output"
ignore_errors: true
environment: "{{ bats_environment }}"
# Adds -i to Ansible's default
become_flags: '-H -S -n -i'

- name: "Read results"
shell: "cat {{ bats_output_dir }}/{{ item }}.tap"
Expand Down

0 comments on commit 40a4ada

Please sign in to comment.