From b8d24d630b600d2ae516df7377473f9f32975538 Mon Sep 17 00:00:00 2001 From: "S. Lockwood-Childs" Date: Tue, 3 May 2016 01:29:58 -0700 Subject: [PATCH] ansible has deprecated 'sudo', use 'become' Fixes nylas/ansible-test#2 Migrate from ansible's pre-1.9 privilege escalation mechanism to the current mechanism: * Switch 'sudo:' to 'become:' in playbook * Remove '-s' from ansible-playbook command-line --- ansible_test/resources/Dockerfile.j2 | 6 +++--- ansible_test/resources/playbook.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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 }}"