Commit Graph

80 Commits

Author SHA1 Message Date
Kevin Fenzi
f67d942dbb pagure: http.logrotate is a template now
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-05-24 21:21:27 -07:00
Michal Konecny
a0046b5b4b [distgit] Fixing ansible lint errors
This commit is fixing ansible lint errors for distgit role.

It also introduces two new addition to skip list as the structure of our
ansible repository doesn't adhere to ansible standards.

The errors that will be now skipped are:
- role-name[path] - we have plenty of roles that have sub-roles inside
  them and we need to access them
- var-naming[no-role-prefix] - variables for roles are not usually
  prefixed correctly in our repository and forcing people to change that
  will introduce more issues than what it solves
2025-04-30 10:07:35 +00:00
Aurélien Bompard
d884a0f8ba Use the combined RabbitMQ CA cert in the clients
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2025-04-11 15:15:45 +02:00
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
Michal Konecny
7b58dfdce8 Remove fedmsg and github2fedmsg from staging
The messaging bridges openshift project and github2fedmsg VM were
already removed in staging. This is to clean the ansible playbooks.

I will create a separate one for production after this one is merged.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-04 09:13:40 +01:00
Kevin Fenzi
a6c874f45e pagure: fix overzellous shell call that should be a variable
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-01-24 20:18:38 -08: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
25391e95b7 ansiblelint fixes - fqcn[action-core] - package to ansible.builtin.package
Replaces many references to  package: with ansible.builtin.package

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:28:00 +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
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
Nils Philippsen
205e2c9ed5 distgit/pagure: Set git directories as safe
This was fixed previously for pagure.io in the context of
paguremirroring. Turns out, it affects all kinds of git operations, so
document and move accordingly.

Fixes: releng#12181
Fixes: fedora-infrastructure#12010

Signed-off-by: Nils Philippsen <nils@redhat.com>
2024-06-27 11:21:19 +02:00
Michal Konecny
abe14b6489 [pagure] Change the folder permission for pagure
To create a new log file the as paguremirroring user we need to add write
permissions to /var/log/pagure/ folder as well. This is correctly set for
distgit/pagure role, but not for pagure itself.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-04 11:52:42 +02:00
Michal Konecny
c897c9c197 [pagure] Add tags to acl fix
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-04 10:28:39 +02:00
Kevin Fenzi
4701fd8783 pagure: fix typo
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-06-03 14:13:40 -07:00
Michal Konecny
c5b14f29fa [pagure] Add default ACLs to /var/log/pagure
This is a permanent fix for https://pagure.io/fedora-infrastructure/issue/11957

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-03 21:10:36 +00:00
Michal Konecny
17f02d725a [Pagure] Enable safe directories for production
See https://pagure.io/fedora-infrastructure/issue/11330 for more details.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-09-21 17:19:38 +02:00
Michal Konecny
ba7424bdf2 [Pagure] The value needs to be string
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-09-06 10:17:33 +02:00
Michal Konecny
3c9cd1ad34 [Pagure] Set git directories as safe system-wide
This will solve https://pagure.io/fedora-infrastructure/issue/11330

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-09-06 10:12:02 +02:00
Michal Konecny
88f7258c7b [Pagure] Enable OIDC on production
As OIDC authentication works without issue on staging let's enable it on
production as well.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-08-14 11:25:39 +02:00
Michal Konecny
a4ddf54509 [Pagure] Limit the httplib2 task by tags
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-08-11 12:04:09 +02:00
Aurélien Bompard
1e26cf9246 Some more fixes to get Pagure to work with OIDC on staging
- patch the httplib2 library to avoid hardcoding TLSv1
- set the missing configuration variables in `pagure.cfg` (they have no
  defaults)
- set the password for the future production version of
  `client_secrets.json`

Also note that in the private ansible repo, the Pagure client
configuration in Ipsilon was fixed: the `token_endpoint_auth_method`
variable was set to `"client_secret_post"`.

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2023-08-11 11:39:03 +02:00
Michal Konečný
5238a92325 [Pagure] Add flask OIDC package to dependencies
Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-07-18 16:12:05 +02:00
Michal Konečný
e54dae6574 [Pagure] Use correct staging env variable
Also change the client_secrets.json permissions to match pagure.cfg.

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-07-18 14:53:16 +02:00
Michal Konečný
4e14997780 [Pagure] Fix yamllint errors
Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-07-17 18:04:18 +02:00
Michal Konečný
d1dc3f649b [Pagure] Enable OIDC in staging
Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-07-17 17:35:38 +02:00
Kevin Fenzi
d44bc3991c pagure: handle stunnel bundled cert in letsencrypt renews
This commit removes the old tasks to try and create a cert/intermediate
bundle file for stunnel in favor of just doing it when we renew/get the
cert. It also fixes stunnel to use the correct bundled cert.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-01-20 11:55:13 -08:00
Kevin Fenzi
f183f5262b pagure-stg01 / ipsilon*.stg: split db passwords from stg and prod
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-09-19 13:53:15 -07:00
Kevin Fenzi
1133e45da3 pagure: fix ssl cert deployment
The current playbook assumes the old digicert ssl cert thats in private.
However, we got that in 2020 and it's expired. We switched pagure.io
over to letsencrypt a while back. Somehow we didn't change the playbook
however, or the change was lost somewhere. :(

So, this adds 2 calls to the letsencrypt role to get certs for the prod
and staging pagure instances. I think this should do the right thing
with placement of files, but more eyes welcome.

Without this playbooks runs have the chance of messing up pagure.io
certs, so I think we should fix this asap.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-04-30 16:52:39 +00:00
Kevin Fenzi
5f14ef5388 pagure: fix typo in playbook enabling pagure_mirror service
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-01-11 17:30:22 -08:00
Kevin Fenzi
4415adee47 pagure: enable pagure_mirror service on boot
For some reason pagure_mirror wasn't enabled by default on boot.
We do use this service and want it on. Upstream can likely enable it,
but in the mean time we will enable it on our instances.

See https://pagure.io/fedora-infrastructure/issue/10262

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-11-03 21:54:17 +00:00
seddikalaouiismaili
7478f3fb98 correct task name nagios sebool 2021-06-08 02:12:05 +02:00
seddikalaouiismaili
a113166424 enable sebool for nagios 2021-06-07 23:50:01 +00:00
Pierre-Yves Chibon
30336150a8 pagure: add another tag
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2021-02-12 09:52:00 +01:00
Pierre-Yves Chibon
5d18697e9c pagure: add a couple of tags
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2021-01-08 10:53:11 +01:00
Pierre-Yves Chibon
677e20cf5d pagure: install python3-pagure-messages on the host
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2021-01-08 10:38:51 +01:00
Pierre-Yves Chibon
78ecdfe13d pagure: the hotfix to the stream server needs to restart the pagure_ev service, not httpd
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2021-01-08 09:58:07 +01:00
Pierre-Yves Chibon
7142c188a0 pagure: hotfix the stream server with the py3-only version
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2021-01-08 09:56:39 +01:00
Kevin Fenzi
8316535c1a pagure / production: fix typo
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-01-04 12:36:05 -08:00
Kevin Fenzi
c0025e4cce pagure / production: add letsencrypt config for pagure.io ssl certs.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-01-04 12:34:24 -08:00
Kevin Fenzi
5d8fd0a764 pagure / staging: www and lists do not exist in staging
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-01-04 12:07:00 -08:00
Kevin Fenzi
6866165646 pagure / staging: try a different format for aliases
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-01-04 12:04:42 -08:00
Kevin Fenzi
b31730d841 pagure / staging: combine certs to 1, clean up logic
There's no reason to not just use one letsencrypt cert for stg.pagure.
Also clean up logic in the web config and make sure all the servernames
are handled correctly.

Once this works, will roll this to production.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-01-04 11:52:09 -08:00
Pierre-Yves Chibon
3351fbd3b4 drop run_once when install selinux policies
Otherwise the policy doesn't get installed everywhere...

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-11-10 16:48:42 +01:00
Pierre-Yves Chibon
cb2a947479 pagure: fix path to the selinux policy file
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-11-10 15:59:32 +01:00
Pierre-Yves Chibon
033c798d6e pagure: make use of the new selinux/module role to install/compile selinux policies
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-11-10 15:55:10 +01:00
Pierre-Yves Chibon
cb018f088b distgit/pagure: fix debug calls, msg is not for variables
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-11-09 16:22:24 +01:00