diff --git a/ansible_test/resources/Dockerfile.j2 b/ansible_test/resources/Dockerfile.j2 index f2f7e3d..e84c284 100644 --- a/ansible_test/resources/Dockerfile.j2 +++ b/ansible_test/resources/Dockerfile.j2 @@ -16,6 +16,6 @@ ADD . /build COPY .ansible-test /build WORKDIR /build -CMD /opt/ansible/venv/bin/ansible-playbook -i inventory.yml \ - -c local -s -e testing=true -e role=$DOCKER_TEST_ROLE \ - {{ extra_args| join(" ") }} playbook.yml; /bin/bash \ No newline at end of file +CMD . /opt/ansible/venv/bin/activate && ansible-playbook -i inventory.yml \ + -c local -e testing=true -e role=$DOCKER_TEST_ROLE \ + {{ extra_args| join(" ") }} playbook.yml; /bin/bash diff --git a/ansible_test/resources/playbook.yml b/ansible_test/resources/playbook.yml index b1ac851..ccec49f 100644 --- a/ansible_test/resources/playbook.yml +++ b/ansible_test/resources/playbook.yml @@ -3,6 +3,6 @@ - name: Ansible Test Base Playbook connection: local hosts: localhost - sudo: yes + become: yes roles: - - "{{ role }}" \ No newline at end of file + - "{{ role }}"