diff --git a/nodepool/elements/nodepool-base/install.d/59-sudoers b/nodepool/elements/nodepool-base/install.d/59-sudoers new file mode 100755 index 0000000000..8b0d57d43c --- /dev/null +++ b/nodepool/elements/nodepool-base/install.d/59-sudoers @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2017 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# +# See the License for the specific language governing permissions and +# limitations under the License. + +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -eu +set -o pipefail + +# Make sure our sudoers files have the proper permissions. +chmod 0440 /etc/sudoers.d/jenkins-sudo +chmod 0440 /etc/sudoers.d/jenkins-sudo-grep diff --git a/nodepool/elements/nodepool-base/post-install.d/89-jenkins-scripts b/nodepool/elements/nodepool-base/post-install.d/89-jenkins-scripts index a81028d542..4e36080399 100755 --- a/nodepool/elements/nodepool-base/post-install.d/89-jenkins-scripts +++ b/nodepool/elements/nodepool-base/post-install.d/89-jenkins-scripts @@ -29,7 +29,3 @@ cp -a /opt/git/openstack-infra/project-config/jenkins/data \ /usr/local/jenkins/common_data cp -a /opt/git/openstack-infra/project-config/jenkins/scripts \ /usr/local/jenkins/slave_scripts - -# Make sure our sudoers files have the proper permissions. -chmod 0440 /etc/sudoers.d/jenkins-sudo -chmod 0440 /etc/sudoers.d/jenkins-sudo-grep