Commit 15b28a02 by Michael Roytman

add sudoers file to sudoers.d

parent f31c4849
...@@ -78,4 +78,4 @@ jenkins_tools_debian_pkgs: ...@@ -78,4 +78,4 @@ jenkins_tools_debian_pkgs:
- psmisc - psmisc
- mysql-client-core-5.6 - mysql-client-core-5.6
jenkins_tools_docker_user: 'jenkins-docker-proxy' JENKINS_TOOLS_DOCKER_USER: 'jenkins-docker-proxy'
...@@ -10,10 +10,11 @@ dependencies: ...@@ -10,10 +10,11 @@ dependencies:
jenkins_custom_plugins: [] jenkins_custom_plugins: []
jenkins_bundled_plugins: "{{ jenkins_tools_bundled_plugins }}" jenkins_bundled_plugins: "{{ jenkins_tools_bundled_plugins }}"
jenkins_debian_pkgs: "{{ jenkins_tools_debian_pkgs }}" jenkins_debian_pkgs: "{{ jenkins_tools_debian_pkgs }}"
# Needed to be able to build docker images. Used by Docker Image Builder Jobs. # Needed to be able to build docker images. Used by Docker Image Builder Jobs.
- role: user - role: user
user_info: user_info:
- name: '{{ jenkins_tools_docker_user }}' - name: '{{ JENKINS_TOOLS_DOCKER_USER }}'
- role: docker-tools - role: docker-tools
docker_users: docker_users:
- '{{ jenkins_tools_docker_user }}' - '{{ JENKINS_TOOLS_DOCKER_USER }}'
...@@ -19,3 +19,15 @@ ...@@ -19,3 +19,15 @@
tags: tags:
- install - install
- install:system-requirements - install:system-requirements
- name: Create sudoers file from template
template:
dest: "/etc/sudoers.d/99-tools_jenkins"
src: "99-tools-jenkins.j2"
owner: "root"
group: "root"
mode: "0440"
validate: 'visudo -cf %s'
tags:
- install
- install:configuration
{{ jenkins_user }} ALL=({{ JENKINS_TOOLS_DOCKER_USER }}) SETENV:NOPASSWD:/usr/bin/docker
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment