From 8222ad2201b1e97f16bacd41e49ba0ebb8566ecc Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Thu, 12 Dec 2019 16:25:07 +0100 Subject: [PATCH] chacra-pull-requests: Replace ansible sudo with become "become" is the correct ansible keyword for priv escalation in newer versions. So use that. This will fix at least the ansible-playbook setup.yml call which previously failed. Signed-off-by: Thomas Bechtold --- chacra-pull-requests/setup/playbooks/setup.yml | 2 +- .../setup/playbooks/tasks/postgresql.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chacra-pull-requests/setup/playbooks/setup.yml b/chacra-pull-requests/setup/playbooks/setup.yml index 04dc83a6..4241b360 100644 --- a/chacra-pull-requests/setup/playbooks/setup.yml +++ b/chacra-pull-requests/setup/playbooks/setup.yml @@ -2,7 +2,7 @@ - hosts: localhost user: jenkins-build - sudo: True + become: True tasks: - include: tasks/postgresql.yml diff --git a/chacra-pull-requests/setup/playbooks/tasks/postgresql.yml b/chacra-pull-requests/setup/playbooks/tasks/postgresql.yml index ee9938e7..9e43052a 100644 --- a/chacra-pull-requests/setup/playbooks/tasks/postgresql.yml +++ b/chacra-pull-requests/setup/playbooks/tasks/postgresql.yml @@ -2,7 +2,7 @@ - name: update apt cache apt: update_cache: yes - sudo: yes + become: yes - name: set postgresql version on trusty set_fact: @@ -15,7 +15,7 @@ when: ansible_distribution_release == "xenial" - name: install postgresql requirements - sudo: yes + become: yes apt: name: "{{ item }}" state: present @@ -33,10 +33,10 @@ name: postgresql state: started enabled: yes - sudo: yes + become: yes - name: allow users to connect locally - sudo: yes + become: yes lineinfile: dest: "/etc/postgresql/{{ postgresql_version }}/main/pg_hba.conf" # allow all ipv4 local connections without a password @@ -55,4 +55,4 @@ - service: name: postgresql state: restarted - sudo: true + become: true -- 2.39.5