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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Tue Mar 9 10:36:46 UTC 2021


osmith has submitted this change. ( 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(-)

Approvals:
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved
  osmith: Verified



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-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210309/4573ae40/attachment.htm>


More information about the gerrit-log mailing list