mirror of
https://github.com/status-im/infra-nimbus.git
synced 2025-01-19 18:18:52 +00:00
Jakub Sokołowski
f96fe517e7
I was thinking of defining the jobs as nimbus user systemd units, but that would not work unless nimbus user logged in at least once. And Systemd services have no functionality for allowing non-root users to start/stop/restart system services, so sudo is the simplest way. Signed-off-by: Jakub Sokołowski <jakub@status.im>
27 lines
756 B
YAML
27 lines
756 B
YAML
---
|
|
- name: Create user for beacon node builds
|
|
user:
|
|
name: '{{ beacon_node_builds_user }}'
|
|
group: '{{ beacon_node_builds_group }}'
|
|
groups: ['docker']
|
|
shell: '/bin/zsh'
|
|
|
|
- name: Set disable rebase as merge strategy
|
|
git_config:
|
|
scope: 'global'
|
|
name: 'pull.rebase'
|
|
value: false
|
|
become_user: '{{ beacon_node_builds_user }}'
|
|
|
|
- name: Configure access to Docker Hub
|
|
docker_login:
|
|
username: '{{ beacon_node_builds_docker_hub_user | mandatory }}'
|
|
password: '{{ beacon_node_builds_docker_hub_token | mandatory }}'
|
|
become_user: '{{ beacon_node_builds_user }}'
|
|
|
|
- name: Sudoers file to let non-root users start jobs
|
|
template:
|
|
src: 'builds_sudoers.j2'
|
|
dest: '/etc/sudoers.d/80-beacon-node-builds'
|
|
mode: 0440
|