openqa/server: make geekotest static UID/GID optional
I'm still kinda trying to make the openqa roles usable outside of infra, so now I have a minute, let's do this: it makes the static UID/GID for geekotest optional and configurable, instead of hard coding it. For infra we set the value to 601, as we are already using, in the openqa and openqa-stg group config.
This commit is contained in:
parent
37d3559893
commit
f4133798f6
3 changed files with 13 additions and 8 deletions
|
@ -3,6 +3,8 @@ virt_install_command: "{{ virt_install_command_one_nic }} --cpu=host-passthrough
|
|||
|
||||
external_hostname: openqa.fedoraproject.org
|
||||
|
||||
openqa_static_uid = 601
|
||||
|
||||
openqa_hostname: localhost
|
||||
openqa_email: adamwill@fedoraproject.org
|
||||
openqa_nickname: adamwill
|
||||
|
|
|
@ -14,6 +14,8 @@ virt_install_command: "{{ virt_install_command_one_nic }} --cpu=host-passthrough
|
|||
|
||||
external_hostname: openqa.stg.fedoraproject.org
|
||||
|
||||
openqa_static_uid = 601
|
||||
|
||||
openqa_hostname: localhost
|
||||
openqa_email: adamwill@fedoraproject.org
|
||||
openqa_nickname: adamwill
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
## default - ansible_nodename
|
||||
|
||||
# Optional vars
|
||||
# - openqa_static_uid
|
||||
## int - a static ID for the geekotest user and group if desired
|
||||
## this is useful for NFS mounting openQA data files
|
||||
# - openqa_dbname
|
||||
## string - The name of the database to use
|
||||
# - openqa_dbhost
|
||||
|
@ -35,23 +38,21 @@
|
|||
# set, the server will use a local SQLite database and the other values
|
||||
# are ignored.
|
||||
|
||||
# As we want to store some geekotest-owned files in shared storage, we
|
||||
# need to ensure geekotest always has the same uid/gid if we re-deploy
|
||||
# the servers. So we create the account here with uid/gid 601.
|
||||
- name: Create geekotest group with static GID
|
||||
group: "name=geekotest gid={{ openqa_static_uid }} system=yes"
|
||||
when: "openqa_static_uid is defined"
|
||||
|
||||
- name: Create geekotest group with static GID 601
|
||||
group: name=geekotest gid=601 system=yes
|
||||
|
||||
- name: Create geekotest user with static UID 601
|
||||
- name: Create geekotest user with static UID
|
||||
user:
|
||||
name: geekotest
|
||||
comment: "openQA user"
|
||||
uid: 601
|
||||
uid: "{{ openqa_static_uid }}"
|
||||
group: geekotest
|
||||
home: "/var/lib/openqa"
|
||||
createhome: no
|
||||
system: yes
|
||||
shell: /sbin/nologin
|
||||
when: "openqa_static_uid is defined"
|
||||
|
||||
# note: we need updates-testing until fedfind 2.x and openQA 4.3-21 go stable
|
||||
- name: Install required packages (testing)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue