]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: Optionally disable sudo access for jenkins-build user 1572/head
authorDavid Galloway <dgallowa@redhat.com>
Wed, 20 May 2020 19:53:08 +0000 (15:53 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 20 May 2020 19:53:08 +0000 (15:53 -0400)
Sometimes that user just doesn't need sudo access y'know?

Signed-off-by: David Galloway <dgallowa@redhat.com>
ansible/examples/slave.yml
ansible/examples/slave_libvirt.yml
ansible/examples/slave_libvirt_static.yml
ansible/examples/slave_static.yml

index b97e3adcf9cb548b7ea871d5ab906b37da9dea8f..a48e070fd7e328957886b6d1845bbde0f45b0d88 100644 (file)
@@ -14,6 +14,7 @@
    - nodename: '{{ nodename }}'
    - labels: '{{ labels }}'
    - use_jnlp: false
+   - grant_sudo: true
    - osc_user: 'username'
    - osc_pass: 'password'
 
@@ -87,6 +88,7 @@
         regexp: '^{{ jenkins_user }} ALL'
         line: '{{ jenkins_user }}   ALL=(ALL:ALL) NOPASSWD:ALL'
         validate: 'visudo -cf %s'
+      when: grant_sudo
 
     - name: set utf-8 for LC_ALL
       lineinfile:
index 70530bfde8cf5844acdd131fc3fd12f37dc05dfd..b4fd1db05110537eee9770cc74023bfa2f4ede41 100644 (file)
@@ -13,6 +13,7 @@
    - nodename: '{{ nodename }}'
    - labels: '{{ labels }}'
    - use_jnlp: false
+   - grant_sudo: true
 
   tasks:
     - name: uninstall resolvconf on Ubuntu to manually manage resolv.conf
         regexp: '^{{ jenkins_user }} ALL'
         line: '{{ jenkins_user }}   ALL=(ALL:ALL) NOPASSWD:ALL'
         validate: 'visudo -cf %s'
+      when: grant_sudo
 
     - name: set utf-8 for LC_ALL
       lineinfile:
index f96f76a339005407c738a48e95c87f82903ca9fe..0310fcf68b05652b6af7c3cdf503ae358c0a6d00 100644 (file)
@@ -19,6 +19,7 @@
    - api_uri: 'https://2.jenkins.ceph.com'
    - nodename: '{{ ansible_hostname }}'
    - labels: 'vagrant libvirt'
+   - grant_sudo: true
 
   tasks:
 
         regexp: '^{{ jenkins_user }} ALL'
         line: '{{ jenkins_user }}   ALL=(ALL:ALL) NOPASSWD:ALL'
         validate: 'visudo -cf %s'
+      when: grant_sudo
 
     - name: set utf-8 for LC_ALL
       lineinfile:
index f32f7f4ca372ffd2fdabfd5003c0acce0bf8c2c6..656b05931382ca8e5f4314fd87d24a9e393858f3 100644 (file)
@@ -28,6 +28,7 @@
    - nodename: '{{ ansible_hostname }}'
    - labels: '{{ labels }}'
    - use_jnlp: true
+   - grant_sudo: true
    - osc_user: 'username'
    - osc_pass: 'password'
 
@@ -57,6 +58,7 @@
         regexp: '^{{ jenkins_user }} ALL'
         line: '{{ jenkins_user }}   ALL=(ALL:ALL) NOPASSWD:ALL'
         validate: 'visudo -cf %s'
+      when: grant_sudo
 
     - name: set utf-8 for LC_ALL
       lineinfile: