copr-dist-git; create users and groups beforehand with predefined uids and gids
...so that we don't need to chown huge amount of files after deploy
This commit is contained in:
parent
bf4f98cbae
commit
197b291809
1 changed files with 14 additions and 9 deletions
|
@ -2,6 +2,18 @@
|
|||
|
||||
#- copy: src="dist-git-epel-7.repo" dest="/etc/yum.repos.d/"
|
||||
|
||||
# pre-create users/groups and copy uids/gids from the current prod copr-dist-git
|
||||
- group: name="packager" state=present gid=987
|
||||
- group: name="cvsadmin" state=present gid=1001
|
||||
- group: name="copr-dist-git" state=present gid=1002
|
||||
- group: name="copr-service" state=present gid=1003
|
||||
|
||||
- name: create user for git repos
|
||||
user: name="copr-dist-git" group=copr-dist-git groups=cvsadmin,packager uid=1001
|
||||
|
||||
- name: create user for copr-git service
|
||||
user: name="copr-service" group=copr-service groups=packager generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa uid=1002
|
||||
|
||||
- name: install packages
|
||||
dnf: state=present name={{ item }}
|
||||
with_items:
|
||||
|
@ -12,6 +24,8 @@
|
|||
- rdiff-backup
|
||||
- tmpwatch
|
||||
|
||||
- user: append=yes name="copr-service" groups=apache,mock
|
||||
|
||||
- name: install copr-dist-git
|
||||
dnf: state=latest name={{ item }}
|
||||
with_items:
|
||||
|
@ -30,15 +44,6 @@
|
|||
with_items:
|
||||
- pyrpkg
|
||||
|
||||
# TODO: remove, this should be done by `dist-git` package
|
||||
- group: name="cvsadmin" state=present
|
||||
|
||||
- name: create user for git repos
|
||||
user: name="copr-dist-git" groups=cvsadmin,packager
|
||||
|
||||
- name: create user for copr-git service
|
||||
user: name="copr-service" groups=apache,packager,mock,docker generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa
|
||||
|
||||
- name: make sure directories are owned by copr-service user
|
||||
file: path={{ item }} owner=copr-service group=copr-service state=directory recurse=yes
|
||||
with_items:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue