From: Thomas Bechtold Date: Thu, 12 Dec 2019 15:25:07 +0000 (+0100) Subject: chacra-pull-requests: Replace ansible sudo with become X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8222ad2201b1e97f16bacd41e49ba0ebb8566ecc;p=ceph-build.git 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 --- 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