Skip to content

Commit 4f48a2d

Browse files
authored
Merging sudoers step (#354)
* Merging sudoers step * Updating UF * Pinning ubi-minimal version again due to openssl-devel breakage
1 parent 6c418b3 commit 4f48a2d

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

base/redhat-8/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# the container catalog moved from registry.access.redhat.com to registry.redhat.io
1717
# So at some point before they deprecate the old registry we have to make sure that
1818
# we have access to the new registry and change where we pull the ubi image from.
19-
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1
19+
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1-407
2020
LABEL name="splunk" \
2121
maintainer="support@splunk.com" \
2222
vendor="splunk" \

splunk/common-files/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ COPY [ "splunk/common-files/entrypoint.sh", "splunk/common-files/createdefaults.
9595
COPY splunk-ansible ${SPLUNK_ANSIBLE_HOME}
9696

9797
# Set sudo rights
98-
RUN sed -i -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers \
99-
&& sudo echo -e '\nansible ALL=(splunk)NOPASSWD:ALL' >> /etc/sudoers \
98+
RUN sed -i -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL\nansible ALL=(splunk)NOPASSWD:ALL/g' /etc/sudoers \
10099
&& echo 'Create the ansible user/group' \
101100
&& groupadd -r ${ANSIBLE_GROUP} \
102101
&& useradd -r -m -g ${ANSIBLE_GROUP} ${ANSIBLE_USER} \

uf/common-files/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,13 @@ COPY [ "uf/common-files/entrypoint.sh", "uf/common-files/checkstate.sh", "uf/com
8888
USER root
8989

9090
# Setup users and groups
91-
RUN \
92-
# Set sudo rights
93-
sed -i -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers \
94-
&& sudo echo -e '\nansible ALL=(splunk)NOPASSWD:ALL' >> /etc/sudoers \
95-
# Create the ansible user/group
91+
RUN sed -i -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL\nansible ALL=(splunk)NOPASSWD:ALL/g' /etc/sudoers \
92+
&& echo 'Create the ansible user/group' \
9693
&& groupadd -r ${ANSIBLE_GROUP} \
9794
&& useradd -r -m -g ${ANSIBLE_GROUP} ${ANSIBLE_USER} \
9895
&& usermod -aG sudo ${ANSIBLE_USER} \
9996
&& usermod -aG ${ANSIBLE_GROUP} ${SPLUNK_USER} \
100-
# Container Artifact Directory is a place for all artifacts and logs that are generated by the provisioning process. The directory is owned by the user "ansible".
97+
&& echo 'Container Artifact Directory is a place for all artifacts and logs that are generated by the provisioning process. The directory is owned by the user "ansible".' \
10198
&& mkdir ${CONTAINER_ARTIFACT_DIR} \
10299
&& chown -R ${ANSIBLE_USER}:${ANSIBLE_GROUP} ${CONTAINER_ARTIFACT_DIR} \
103100
&& chmod -R 775 ${CONTAINER_ARTIFACT_DIR} \

0 commit comments

Comments
 (0)