Change in osmo-ci[master]: ansible: remove raspbian default user "pi"

osmith gerrit-no-reply at lists.osmocom.org
Mon Mar 8 16:29:30 UTC 2021


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/23275 )


Change subject: ansible: remove raspbian default user "pi"
......................................................................

ansible: remove raspbian default user "pi"

Add a new subtask that deletes Raspbian's default user "pi" with
UID=1000, so we can use the UID for the jenkins user. When the ansible
playbook is running, root access via ssh is already configured, so we
don't need the user "pi" anymore.

Related: OS#5055
Change-Id: If0cee6d35016c487eca02752625732dd03fad350
---
M ansible/roles/osmocom-jenkins-slave/tasks/main.yml
1 file changed, 9 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/75/23275/1

diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml
index 3a5cafa..2623201 100644
--- a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml
+++ b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml
@@ -4,6 +4,15 @@
   include_tasks: debian.yml
   when: ansible_distribution == 'Debian'
 
+# Raspbian default user "pi" has uid=1000, which we need for the jenkins user.
+# When the ansible playbook is running, root access via ssh is already
+# configured, so we don't need the user "pi" anymore.
+- name: delete raspbian default user
+  user:
+    name: "pi"
+    remove: true
+    state: absent
+
 - name: add user jenkins
   user:
     name: "{{ jenkins_user }}"

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/23275
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If0cee6d35016c487eca02752625732dd03fad350
Gerrit-Change-Number: 23275
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210308/23b2d3d6/attachment.htm>


More information about the gerrit-log mailing list