Commit Graph

85 Commits

Author SHA1 Message Date
Michal Konecny
2ec055db6f Use first uppercase letter for all handlers
This will unify all the handlers to use first uppercase letter for
ansible-lint to stop complaining.

I went through all `notify:` occurrences and fixed them by running
```
set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep
-rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g"
```

Then I went through all the changes and removed the ones that wasn't
expected to be changed.

Fixes https://pagure.io/fedora-infrastructure/issue/12391

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-10 20:31:49 +00:00
Ryan Lerch
47c68f478d ansiblelint fixes - fqcn[action-core] - template to ansible.builtin.template
Replaces references to template: with ansible.builtin.template

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:30:29 +10:00
Ryan Lerch
3c41882bb0 ansiblelint fixes - fqcn[action-core] - shell to ansible.builtin.shell
Replaces references to shell: with ansible.builtin.shell

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:29:10 +10:00
Ryan Lerch
462176464b ansiblelint fixes-- fqcn[action-core] - command to ansible.builtin.command
Replaces many references to  command: with ansible.builtin.command

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:26:47 +10:00
Ryan Lerch
6a3816dfdc ansiblelint fixes-- fqcn[action-core] - copy to ansible.builtin.copy
Replaces many references to 'copy' with ansible.builtin.copy

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:43:31 +10:00
Ryan Lerch
62952df107 ansiblelint fixes-- fqcn[action-core] - file to ansible.builtin.file
Replaces many references to  file: with ansible.builtin.file

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:41:52 +10:00
Ryan Lerch
691adee6ee Fix name[casing] ansible-lint issues
fix 1900 failures of the following case issue:

`name[casing]: All names should start with an uppercase letter.`

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-14 20:20:07 +10:00
Pavel Raiskup
b3dca04377 copr/keygen/files/backup_keyring.sh: update the comment section 2025-01-13 09:24:07 +01:00
Pavel Raiskup
db6ca9afee copr-keygen: only fix ownership for the initial mount
The task is otherwise very racy:
fatal: [copr-keygen.aws.fedoraproject.org]: FAILED! => {"changed":
false, "msg": "path /var/lib/copr-keygen/gnupg/.#....copr-keygen.aws.fedoraproject.org....
does not exist", "path": "/var/lib/copr-keygen/gnupg/.#l....copr-keygen.aws.fedoraproject.org...."}
2025-01-13 09:08:29 +01:00
Pavel Raiskup
99e3ca8b1e copr-keygen: fix using of backup key
Do not require the key to be imported in keyring.
2025-01-13 08:31:08 +01:00
Ryan Lerch
89f6f1fc32 Fix majority of remaining yamllint warnings and errors
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-11-28 17:31:45 +10:00
Pavel Raiskup
cf46433ec9 copr-keygen: pre-create users before running 'base'
Otherwise we risk a conflict with other automatically allocated users,
right now it is:

fatal: [copr-keygen-dev.aws.fedoraproject.org]: FAILED! => {"changed": false, "msg": "useradd: UID 992 is not unique\n", "name": "copr-signer", "rc": 4}
2024-11-28 00:13:03 +01:00
Jakub Kadlcik
44d826078b copr: move user creation back to copr/keygen role 2022-11-22 10:13:40 +01:00
Jakub Kadlcik
1d58562bfa copr: pre-create users and groups with specifics UIDs and GIDs 2022-11-22 04:00:10 +01:00
Jakub Kadlcik
28300df291 copr: make signd log into a file
This will log what keys were accessed via `sign` command and from what
IP address.
2022-07-18 11:22:05 +02:00
Jakub Kadlcik
fa6c9e9daa copr: add -y for dnf 2021-11-28 23:08:57 +01:00
Jakub Kadlcik
1e63604bf3 copr: install gnupg2 with required bugfixes 2021-11-28 23:03:20 +01:00
Jakub Kadlcik
346e0253e3 copr: ensure services are running only when not services_disabled 2021-11-22 03:05:40 +01:00
Pavel Raiskup
c6a9256a2f copr-keygen: move handlers to a global place
This used to be a role-specific handler, though we have a special
upgrade playbooks (e.g. copr-keygen-upgrade.yml) that failed because
they use but don't import the copr/* roles (and role handlers).  So we
would have to either import role-specific handlers explicitly, or do
this commit.
2021-04-27 16:54:20 +02:00
Pavel Raiskup
5e38e064d0 copr-keygen: use correct --recipient for gpg-encrypted backups 2020-08-12 18:04:40 +02:00
Pavel Raiskup
22e6aebc84 copr-keygen: drop old comment related to mounts
Mounting by UUID (instead of by LABEL) is not ideal, so there's no point
in keeping that commented code around.
2020-05-12 06:43:26 +02:00
Pavel Raiskup
810326a441 copr-keygen: idempotent backup setup 2020-05-12 06:31:46 +02:00
Pavel Raiskup
3f0f67f440 copr-keygen: backup: remove correct file
And produce no stderr in cronjob to avoid unnecessary emails sent
(hourly) by cron.
2020-05-12 06:19:03 +02:00
Pavel Raiskup
f3f74c5e7c copr-keygen: don't put copr-signer to non-existing packager group
The 'packager' group looks like it never existed on keygen host.

Fixes bug in 373773deb2.
2020-05-12 06:13:32 +02:00
Pavel Raiskup
c50794eead copr-keygen: better backup script
We need to have YYYY-MM-DD in file name to actually have correct
incremental backups.  Since we don't overwrite the old backup files now
and we have different filename each day, let's remove the old backup
files and keep only the last one (this is to mimic what happens with DB
backups on copr frontend, which runs
roles/postgresql_server/files/backup-database).

While on it, let's double-quote variable uses.

Per advice in:
https://pagure.io/fedora-infrastructure/issue/8904
2020-05-12 05:45:35 +02:00
Miroslav Suchý
39d42c6a4d copr: yum is dead Dave 2020-04-24 21:34:26 +02:00
Miroslav Suchý
373773deb2 copr: create users for keygen 2020-04-24 21:34:26 +02:00
Jakub Kadlcik
35d8b77bbd copr: fix deprecation warning about evaluating devel as a bare variable
[DEPRECATION WARNING]: evaluating devel as a bare variable, this
    behaviour will go away and you might need to add |bool to the expression
    in the future. Also see CONDITIONAL_BARE_VARS configuration toggle..
    This feature will be removed in
     version 2.12. Deprecation warnings can be disabled by setting
     deprecation_warnings=False in ansible.cfg.
2020-04-24 21:34:07 +02:00
Pavel Raiskup
134f9df1f8 copr: keygen-dev: enable the volume as well as on production 2019-07-11 14:55:23 +02:00
Jakub Kadlčík
96de11a1bf Create manual playbooks for upgrading Copr instances
There is a problem with our current playbooks, that they can be
executed automatically without us knowing about it. That is an issue
particularly during release process because we can prepare new
packages into infra-tags repo or bodhi and a nightly reprovision
can upgrade to them outside of an outage window or any of us being
prepared for it.

Therefore `groups/copr-*.yml` playbooks *should not* upgrade any
packages, but only ensure, that those packages are installed. For
upgrade, there should be separate `manual/copr/copr-*-upgrade.yml`
playbooks. Because they are located under `manual` directory, it
is secured, that they can't be run automatically.
2019-05-01 18:39:27 +02:00
Miroslav Suchý
44650c688e copr: squash_actions is deprecated 2019-04-02 10:27:39 +02:00
clime
c3b5fd2737 copr-keygen: update custom selinux policy 2018-08-28 20:00:41 +02:00
Kevin Fenzi
a8714caab3 first cut at changing all the old |changed to is changed per ansible deprecations 2018-05-07 23:51:48 +00:00
clime
1666f6257a copr-keygen: set selinux to enforcing, add custom policy 2018-04-22 00:31:50 +02:00
Kevin Fenzi
747faacf4e Fix excluding agent sockets. 2017-12-22 17:14:58 +00:00
Kevin Fenzi
afef097a3d switch all the include tasks to import tasks 2017-10-17 17:37:03 +00:00
Kevin Fenzi
a4ca0db30c more include cleanups 2017-10-15 20:22:53 +00:00
clime
ea6684a843 copr-keygen: use dnf ansible module instead of yum-deprecated shell cmd 2017-01-19 16:55:08 +01:00
clime
a964a22280 copr-keygen: let obs-signd be installed as dep of copr-keygen 2017-01-19 16:48:53 +01:00
clime
93090a9512 use yum-deprecated in copr-keygen setup atm 2016-10-12 08:38:26 +02:00
clime
08566177da disable usage of testing volume for copr-keygen-dev 2016-10-11 15:36:33 +02:00
clime
e66346a522 mount testing volume for copr-keygen-dev 2016-10-11 11:44:49 +02:00
clime
a48accc36a allow more time for new key generation on copr-keygen 2016-08-11 22:46:38 +02:00
Kevin Fenzi
6617fcdc95 Fix syntax this way. 2016-06-25 20:51:44 +00:00
Kevin Fenzi
01382c772f Make this idempotent 2016-06-25 20:50:15 +00:00
Kevin Fenzi
7edebbb9aa fix up keygen playbook to be more idempotent 2016-06-25 20:21:44 +00:00
Miroslav Suchý
086cd983a0 copr: cleanup 2016-05-05 06:34:29 +02:00
Miroslav Suchý
bea895099d copr: we need yum, since dnf still cannot handle priority failover 2016-03-29 10:59:14 +02:00
Miroslav Suchý
49f4d0c60e copr: we need yum, since dnf still cannot handle priority failover 2016-03-29 10:57:23 +02:00
Miroslav Suchý
a4a5167f00 copr: this should not be needed anymore 2016-03-29 10:52:17 +02:00