copr-infra: setup root passwords

This is useful when trying to fix things like /etc/fstab
https://fosstodon.org/@praiskup/113557853677016655
This commit is contained in:
Pavel Raiskup 2024-11-29 09:41:23 +01:00
parent 527b9bba7e
commit f11eb65ffc
15 changed files with 49 additions and 18 deletions

View file

@ -1,4 +1,6 @@
--- ---
copr_machine_type: backend
# what is the main backend service name # what is the main backend service name
copr_backend_target: copr-backend.target copr_backend_target: copr-backend.target

View file

@ -1,4 +1,6 @@
--- ---
copr_machine_type: backend
_copr_be_conf: copr-be.conf-dev _copr_be_conf: copr-be.conf-dev
# what is the main backend service name # what is the main backend service name
copr_backend_target: copr-backend.target copr_backend_target: copr-backend.target

View file

@ -1,4 +1,6 @@
--- ---
copr_machine_type: distgit
freezes: false freezes: false
# consumed by roles/copr/certbot # consumed by roles/copr/certbot
letsencrypt: letsencrypt:

View file

@ -1,4 +1,6 @@
--- ---
copr_machine_type: distgit
devel: true devel: true
freezes: false freezes: false
# consumed by roles/copr/certbot # consumed by roles/copr/certbot

View file

@ -1,4 +1,6 @@
--- ---
copr_machine_type: frontend
copr_fe_homedir: /usr/share/copr/coprs_frontend copr_fe_homedir: /usr/share/copr/coprs_frontend
copr_frontend_public_hostname: "copr.fedorainfracloud.org" copr_frontend_public_hostname: "copr.fedorainfracloud.org"
copr_kerberos_auth_enabled: true copr_kerberos_auth_enabled: true

View file

@ -1,4 +1,6 @@
--- ---
copr_machine_type: frontend
allowlist_emails: allowlist_emails:
- msuchy@redhat.com - msuchy@redhat.com
- praiskup@redhat.com - praiskup@redhat.com

View file

@ -1,4 +1,6 @@
--- ---
copr_machine_type: keygen
copr_hostbase: copr-keygen copr_hostbase: copr-keygen
# http + signd dest ports # http + signd dest ports
custom_rules: custom_rules:

View file

@ -1,4 +1,6 @@
--- ---
copr_machine_type: keygen
copr_hostbase: copr-keygen-dev copr_hostbase: copr-keygen-dev
# http + signd dest ports # http + signd dest ports
custom_rules: custom_rules:

View file

@ -1,3 +1,5 @@
--- ---
copr_machine_type: pulp
services_disabled: false services_disabled: false
aws_ipv6_addr: "" aws_ipv6_addr: ""

View file

@ -1,3 +1,5 @@
--- ---
copr_machine_type: pulp
services_disabled: true services_disabled: true
aws_ipv6_addr: "2600:1f18:8ee:ae00:c607:4520:249f:6cc8" aws_ipv6_addr: "2600:1f18:8ee:ae00:c607:4520:249f:6cc8"

View file

@ -55,12 +55,13 @@
# Roles are run first, before tasks, regardless of where you place them here. # Roles are run first, before tasks, regardless of where you place them here.
roles: roles:
- base - copr/pre
- nagios_client - base
- copr/backend - nagios_client
- role: messaging/base - copr/backend
when: copr_messaging - role: messaging/base
- role: rsnapshot-push when: copr_messaging
when: env == "production" - role: rsnapshot-push
- role: log-detective-backup when: env == "production"
when: env == "production" - role: log-detective-backup
when: env == "production"

View file

@ -50,9 +50,10 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles: roles:
- base - copr/pre
- nagios_client - base
- copr/dist_git - nagios_client
- copr/dist_git
handlers: handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml" - import_tasks: "{{ handlers_path }}/restart_services.yml"

View file

@ -50,6 +50,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles: roles:
- base - copr/pre
- nagios_client - base
- copr/frontend - nagios_client
- copr/frontend

View file

@ -84,9 +84,10 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles: roles:
- base - copr/pre
- nagios_client - base
- copr/pulp - nagios_client
- copr/pulp
- name: Use pulp_installer collection - name: Use pulp_installer collection

View file

@ -1,4 +1,11 @@
--- ---
- name: setup the root password
ansible.builtin.user:
name: root
password: "{{ copr_root_passwords[deployment_type][copr_machine_type] }}"
tags:
- root_password
- name: create copr-signer group - name: create copr-signer group
group: name="copr-signer" state=present gid=989 group: name="copr-signer" state=present gid=989
when: "'copr_keygen_aws' in group_names or 'copr_keygen_dev_aws' in group_names" when: "'copr_keygen_aws' in group_names or 'copr_keygen_dev_aws' in group_names"