ansible-role-kojid/tasks/users.yml

69 lines
1.3 KiB
YAML
Raw Normal View History

2021-01-03 19:35:33 +00:00
---
# Create the users on the koji builder
# This user likely isn't used...
# - name: add mock user
# user:
# name: mock
# uid: 425
# state: present
# home: /var/lib/mock
# createhome: true
# system: true
# - name: Fix permissions
# file:
# state: directory
# path: /var/lib/mock
# mode: '2775'
# owner: root
# group: mock
# - name: Create mock ssh directory
# file:
# state: directory
# path: /var/lib/mock/.ssh
# mode: '0700'
# owner: mock
# group: mock
- name: mockbuilder user
2022-03-28 02:48:48 +00:00
ansible.builtin.user:
2021-01-03 19:35:33 +00:00
name: mockbuilder
groups: mock
- name: mockbuilder ssh key
2022-03-28 02:48:48 +00:00
ansible.posix.authorized_key:
2021-01-03 19:35:33 +00:00
user: mockbuilder
key: "{{ mockbuilder_pub_key }}"
2021-01-24 21:57:49 +00:00
when: mockbuilder_pub_key is defined
2021-01-03 19:35:33 +00:00
- name: kojibuilder user
2022-03-28 02:48:48 +00:00
ansible.builtin.user:
2021-01-03 19:35:33 +00:00
name: kojibuilder
groups: mock
- name: kojibuilder ssh key
2022-03-28 02:48:48 +00:00
ansible.posix.authorized_key:
2021-01-03 19:35:33 +00:00
user: kojibuilder
key: "{{ kojibuilder_pub_key }}"
2021-01-24 21:57:49 +00:00
when: kojibuilder_pub_key is defined
2021-01-03 19:35:33 +00:00
# We need the apache user for NFS
- name: apache group
2022-03-28 02:48:48 +00:00
ansible.builtin.group:
2021-01-03 19:35:33 +00:00
name: apache
gid: 48
system: true
state: present
- name: apache user
2022-03-28 02:48:48 +00:00
ansible.builtin.user:
2021-01-03 19:35:33 +00:00
name: apache
uid: 48
createhome: false
group: apache
shell: /sbin/nologin
system: true
state: present