]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
chacra-pull-requests: Replace ansible sudo with become 1449/head
authorThomas Bechtold <tbechtold@suse.com>
Thu, 12 Dec 2019 15:25:07 +0000 (16:25 +0100)
committerThomas Bechtold <tbechtold@suse.com>
Thu, 12 Dec 2019 15:27:39 +0000 (16:27 +0100)
"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 <tbechtold@suse.com>
chacra-pull-requests/setup/playbooks/setup.yml
chacra-pull-requests/setup/playbooks/tasks/postgresql.yml

index 04dc83a6d86f42ea49ed83e69b65cccd54b445d3..4241b360b4e766e4de6dc36fb240a8244319cf15 100644 (file)
@@ -2,7 +2,7 @@
 
 - hosts: localhost
   user: jenkins-build
-  sudo: True
+  become: True
 
   tasks:
      - include: tasks/postgresql.yml
index ee9938e799924efd19c1dc0ebe4da09723340641..9e43052ae999f0a3e02f17b89ad1c781944daab4 100644 (file)
@@ -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
     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