Commit graph

986 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
iamyaash
b3d6a90b9a motd generic template added
migrated notes from infra/hosts

motd changes; excluding CSI infos

removed csi_* vars from group_vars; converted csi_purpose & csi_relationship into notes

fixed merge conflicts

minor changes; var

updating YAMLs & playbooks

udpated YAMLs & playbooks again

updated correctly; buildhw.yml

fixing merge conflicts

dest added in motd.yml
2025-01-28 01:10:14 +00:00
Mattia Verga
afaaf68b22 reg-server: stop serving outdated pages
Signed-off-by: Mattia Verga <mattia.verga@tiscali.it>
2025-01-16 21:35:11 +00:00
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
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
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
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
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
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
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
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
Adam Williamson
73db9ea127 Ensure python3-dnf is installed on Fedora 41+ hosts
dnf5 requires neither python3-rpm nor python3-dnf, so we cannot
assume they are installed (as they always were before). ansible's
package_facts needs python3-rpm (even in the latest upstream
version), so we at least need that. The ansible in rhel9 (which
is what's on batcave01 currently) does not support dnf5 at all,
so we need python3-dnf installed so it can use its dnf3/4
support. python3-dnf relies on python3-rpm, so we can just
check for and install python3-dnf. Once batcave01 is updated to
an ansible that supports dnf5 we won't need python3-dnf, but we
*will* still need python3-rpm.

Stuffing this in yumrepos.yml as it runs on everything, early,
and is packaging-related. We could make it a separate task but
then we'd need to make every playbook include it...

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-11-22 11:21:41 -08:00
Kevin Fenzi
6524d745d2 virt_instance_create: drop python3 handling
We don't have any python2 using virthosts left (except one)
so lets try dropping this special handling here and just let ansible
sort out that it should use python3.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-10-02 10:50:20 -07:00
Stephen Smoogen
432a3a497b Go through and remove entries for EL6 and EL7
Using `git grep el6` and `git grep el7` and variants like EL-7 or
el-7, I found various entries and files which were no longer needed
with the current ansible. I updated text or tests to later versions of
RHEL as needed.

found entries for the fedora ami's for the original cloud and removed
those entries also.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2024-07-03 22:20:30 +00:00
Kevin Fenzi
c84b99223c osbs: raise a glass for it's service
This removes osbs and allmost all it's associated playbooks and files.

It served long and well, but we no longer need it.
flatpaks are building with a koji-flatpak plugin.
base/minimal/toolbox containers are building with kiwi.
We aren't building any other containers right now, and we did they could
be added to kiwi.

This is the end of an era... I look with nostolga on
ansible-ansible-openshift-ansible (a role to setup ansible on a control
host and run it from our ansible).

Good bye osbs!

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-03-28 12:52:07 -07:00
Pavel Raiskup
f5adb3bf01 copr-pulp: swap fix - no btrfs on EL9 2024-03-13 20:18:20 +01:00
Pavel Raiskup
1a81b873e6 aws_cloud: temporary ec2 user 2024-03-13 18:52:43 +01:00
Pavel Raiskup
24673e9e08 copr-pulp-dev: proper birthday 2024-03-13 18:48:32 +01:00
Pavel Raiskup
2effd14627 yumrepos: Fedora hosts primary vs. secondary simplification
The old way of setting Fedora repos was not idempotent for
vmhost-p09-copr01.rdu-cc.fedoraproject.org (was considered both primary
and secondary).  And it appears this would be the same for all Fedora
s390x/ppc64le boxes.
2024-02-14 22:15:37 +00:00
Pavel Raiskup
7136d6003c aws_cloud: better skip condition
fatal: [copr-be-dev.aws.fedoraproject.org]: FAILED! => {"msg": "'dict object' has no attribute 'files'. 'dict object' has no attribute 'files'"}
2023-11-21 15:26:11 +01:00
Pavel Raiskup
eccbf58b3f aws_copr: copr-be fix for #11006
We run the playbook first against the `copr-be-temp.aws..`
inventory_hostname, and then once more against `copr-be.aws..`.  We need
to re-sign the pub keys for the later run.

https://pagure.io/fedora-infrastructure/issue/11006
2023-11-21 15:16:25 +01:00
Pavel Raiskup
c28c90504b aws_cloud: drop additional (-temp) known hosts entries 2023-11-21 14:37:59 +01:00
Pavel Raiskup
166879ab9f aws_cloud: really gather both key types 2023-11-21 14:03:07 +01:00
Pavel Raiskup
445973ffba aws_cloud: drop wrong keytype 2023-11-21 13:59:45 +01:00
Pavel Raiskup
0ed8f5f405 aws_cloud: try to load and hack-around all host keys 2023-11-21 13:53:36 +01:00
Jakub Kadlcik
038a0591c9 copr: install python when birthday, regardless of gathering facts 2023-08-20 15:44:55 +02:00
Kevin Fenzi
c5542bc327 yumrepos: modernize, fix ppc64le bvmhosts and remove modular repos
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-08-19 13:46:57 -07:00
Kevin Fenzi
22dde8163b unbound: remove and retire unbound servers
These instances served long and well as fallback resolvers for
dnssec-trigger. This is no longer needed or used, so lets remove them.
See https://pagure.io/fedora-infrastructure/issue/11415

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-07-24 14:40:43 -07:00
Pavel Raiskup
bee7b64fe5 main.cf files need to be moved before we claim they are templates
Revert "postfix: install main.cf as template"

This reverts commit 57f75cbcab.
2023-06-19 10:39:39 +02:00
Pavel Raiskup
57f75cbcab postfix: install main.cf as template
There is no jinja in the current main.cf files, except for the Copr
main.cf that uses STARTTLS for SMTP relayhost.
2023-06-19 10:33:33 +02:00
Kevin Fenzi
dc82b8da30 batcave: adjust packages for rhel9
This is for a test batcave02 for now, but will be used when we move
batcave01 over to rhel9

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-05-10 16:34:17 -07:00
Pavel Raiskup
6dc43e2d23 copr: disable zram0 swap
We maintain swap partitions ourselves, and zram0 complicates our lives
for multi-swap use-cases:
https://bugzilla.redhat.com/show_bug.cgi?id=2051154
2022-11-29 16:04:07 +01:00
Pavel Raiskup
694554c4aa aws_cloud: temporarily work with rsa by default 2022-11-28 17:57:48 +01:00
Jakub Kadlcik
875ea1548d swap: temporarily comment 'Start swap.swap service' task 2022-11-18 18:45:04 +01:00
Pavel Raiskup
da09946ffa copr-be: document one "ignore_errors" instance 2022-03-15 16:27:27 +01:00
Jakub Kadlcik
259b3878c1 swap: fix file creation to be idempotent, pt2 2022-01-23 23:15:49 +01:00
Jakub Kadlcik
358b3c5130 swap: fix file creation to be idempotent 2022-01-23 22:58:00 +01:00
Jakub Kadlcik
68139c0ff2 swap: automatically start swap.swap service, pt2 2022-01-23 22:20:30 +01:00
Jakub Kadlcik
c9d8a50050 swap: automatically restart swap.swap service 2022-01-23 22:01:14 +01:00
Jakub Kadlcik
8de6ab833f swap: create swapfile only once 2022-01-23 21:45:30 +01:00
Jakub Kadlcik
8495c555cc swap: oops, fix typo 2022-01-23 21:32:41 +01:00
Jakub Kadlcik
415731c1ac swap: try to make swapfile working on btrfs
Since F35, the swap service started failing with:

    kernel: BTRFS warning (device nvme0n1p5): swapfile must not be copy-on-write
    swapon[2976986]: swapon: /swap: swapon failed: Invalid argument
    swap.swap: Swap process exited, code=exited, status=255/EXCEPTION
2022-01-23 21:28:16 +01:00
Mark O Brien
de2279d2cb yumrepos: don't add el9 infra-tags repo for now
Signed-off-by: Mark O Brien <markobri@redhat.com>
2021-12-21 16:51:41 +00:00
Mark O Brien
0230c3f85d yumrepos: skip epel9-infra for now
Signed-off-by: Mark O Brien <markobri@redhat.com>
2021-12-21 16:42:42 +00:00
Jakub Kadlcik
c8c2bbf51a aws_cloud: don't include basessh role
It should be redundant and we observe strage things such as 4x
removing and adding ssh keys, having to manualy confirm "Are you sure
you want to continue connecting (yes/no/[fingerprint])?" and so
on. Let's try to disable the role.
2021-11-29 15:15:21 +01:00
Pavel Raiskup
ad89a66878 tasks/aws_cloud.yml: prefer ed25519 keys for now
Seems like either the RHEL 8 (batcave) or Fedora 35 system (Fedora Copr
Infra) prefers ed25519 keys over rsa, leading to weird auth problems:

TASK [allow root ssh connections] ***************************************************************************************************************************
Monday 29 November 2021  13:06:43 +0000 (0:00:00.314)       0:00:03.632 *******
Monday 29 November 2021  13:06:43 +0000 (0:00:00.314)       0:00:03.632 *******
fatal: [copr-be-dev.aws.fedoraproject.org]: UNREACHABLE! => {"changed": false, "msg": "Data could not be sent to remote host \"copr-be-dev.aws.fedoraproject.org\". Make sure this host can be reached over ssh: Certificate invalid: name is not a listed principal\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\nIT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\r\nSomeone could be eavesdropping on you right now (man-in-the-middle attack)!\r\nIt is also possible that a host key has just been changed.\r\nThe fingerprint for the ED25519 key sent by the remote host is\nSHA256:Cgs/aoJl9OJheAtZZ2CDiYx9ZeFMwD6dUYUJpPDTl58.\r\nPlease contact your system administrator.\r\nAdd correct host key in /root/.ssh/known_hosts to get rid of this message.\r\nOffending RSA key in /root/.ssh/known_hosts:21\r\nED25519 host key for copr-be-dev.aws.fedoraproject.org has changed and you have requested strict checking.\r\nHost key verification failed.\r\n", "unreachable": true}

This lets us move forward with the tomorrow's update.  The previous
hack(s) were not OK.
2021-11-29 14:21:52 +01:00
Pavel Raiskup
1efa0220c3 tasks/aws_cloud.yml: hack with known_hosts removal
We observed a situation when two keys were specified in known_hosts, and
only one was removed by the playbook.  At least we think this is what is
actually happening.
2021-11-29 14:05:20 +01:00
Pavel Raiskup
0270957497 tasks/aws_cloud.yml: try to work with ssh-ed25519, not rsa 2021-11-29 13:53:02 +01:00
Pavel Raiskup
5e8940375f tasks/aws_cloud.yml: better known_hosts cleanup when birthday=yes 2021-11-29 13:47:00 +01:00
Kevin Fenzi
68c5eaebea virt-instance-create: drop old non efi armv7 stuff
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-25 14:17:29 -07:00