From 62952df107f201dbd2b85d5d8aaaf0a54503ecbc Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Tue, 17 Dec 2024 15:31:55 +1000 Subject: [PATCH] ansiblelint fixes-- fqcn[action-core] - file to ansible.builtin.file Replaces many references to file: with ansible.builtin.file Signed-off-by: Ryan Lerch --- playbooks/check-host.yml | 4 +-- playbooks/groups/bodhi-backend.yml | 4 +-- playbooks/groups/build-kcs.yml | 2 +- playbooks/groups/debuginfod.yml | 2 +- playbooks/groups/download.yml | 2 +- playbooks/groups/ipa.yml | 2 +- playbooks/groups/nfs-servers.yml | 4 +-- playbooks/groups/oci-registry.yml | 2 +- playbooks/groups/os-control.yml | 2 +- playbooks/groups/people.yml | 2 +- playbooks/include/proxies-fedorahosted.yml | 2 +- playbooks/include/proxies-miscellaneous.yml | 2 +- playbooks/include/proxies-reverseproxy.yml | 2 +- playbooks/include/proxies-websites.yml | 2 +- .../fix-home-fedora-ownerships.yml | 2 +- .../uninstall_ipa_client.yml | 2 +- playbooks/manual/ocp4-place-ignitionfiles.yml | 4 +-- playbooks/manual/rebuild/hotspot.yml | 2 +- playbooks/manual/rebuild/mote.yml | 2 +- playbooks/manual/remote_delldrive.yml | 2 +- playbooks/manual/sign-and-import.yml | 2 +- playbooks/manual/staging-sync/bodhi.yml | 2 +- playbooks/manual/staging-sync/koji.yml | 4 +-- playbooks/manual/staging-sync/mailman.yml | 2 +- playbooks/manual/update-firmware.yml | 6 ++-- roles/abrt/faf-post/tasks/main.yml | 2 +- roles/abrt/faf-pre/tasks/main.yml | 4 +-- roles/abrt/faf/tasks/config.yml | 2 +- .../abrt/retrace-post/tasks/retrace_setup.yml | 6 ++-- roles/abrt/retrace-pre/tasks/main.yml | 6 ++-- roles/apps-fp-o/tasks/main.yml | 2 +- roles/base/tasks/keytab.yml | 6 ++-- roles/base/tasks/main.yml | 10 +++--- roles/basessh/tasks/main.yml | 2 +- roles/batcave/tasks/main.yml | 14 ++++---- roles/bodhi2/backend/tasks/main.yml | 6 ++-- roles/bodhi2/base/tasks/main.yml | 2 +- roles/btrfs/tasks/main.yml | 2 +- roles/bugzilla2fedmsg/tasks/main.yml | 2 +- roles/builder_repo/tasks/main.yml | 2 +- roles/centosci-keytab/tasks/main.yml | 2 +- roles/cgit/base/tasks/main.yml | 4 +-- roles/cgit/make_pkgs_list/tasks/main.yml | 2 +- roles/check-compose/tasks/main.yml | 2 +- roles/collectd/base/tasks/main.yml | 2 +- roles/collectd/fcomm-queue/tasks/main.yml | 2 +- roles/collectd/server/tasks/main.yml | 4 +-- ...oy-communishift-authorization-operator.yml | 2 +- .../provision/provision_builder_tasks.yml | 10 +++--- roles/copr/backend/handlers/main.yml | 2 +- roles/copr/backend/tasks/aws.yml | 2 +- roles/copr/backend/tasks/copr-ping.yml | 4 +-- roles/copr/backend/tasks/main.yml | 14 ++++---- roles/copr/backend/tasks/mount_fs.yml | 2 +- roles/copr/backend/tasks/pulp.yml | 2 +- roles/copr/backend/tasks/resalloc.yml | 2 +- .../tasks/setup_provisioning_environment.yml | 2 +- roles/copr/certbot/tasks/letsencrypt.yml | 2 +- roles/copr/dist_git/tasks/main.yml | 8 ++--- roles/copr/dist_git/tasks/mount_fs.yml | 6 ++-- roles/copr/frontend/tasks/httpd.yml | 2 +- roles/copr/frontend/tasks/main.yml | 6 ++-- roles/copr/frontend/tasks/psql_setup.yml | 4 +-- roles/copr/hypervisor/tasks/main.yml | 2 +- roles/copr/keygen/tasks/main.yml | 7 ++-- roles/copr/keygen/tasks/setup_backup.yml | 2 +- roles/developer/build/tasks/main.yml | 2 +- roles/distgit/pagure/tasks/main.yml | 16 ++++----- roles/distgit/tasks/main.yml | 12 +++---- roles/docker-distribution/tasks/main.yml | 2 +- roles/download/tasks/main.yml | 4 +-- roles/easyfix/gather/tasks/main.yml | 4 +-- roles/easyfix/proxy/tasks/main.yml | 2 +- .../tasks/administration-tasks.yml | 2 +- roles/fas2discourse/tasks/create-keytab.yml | 2 +- roles/fedmsg/base/tasks/main.yml | 10 +++--- roles/fedmsg/crl/tasks/main.yml | 2 +- roles/fedmsg/gateway/slave/tasks/main.yml | 4 +-- roles/fedmsg/gateway/tasks/main.yml | 4 +-- roles/fedmsg/hub/tasks/main.yml | 8 ++--- roles/fedmsg/irc/tasks/main.yml | 2 +- roles/fedmsg/relay/tasks/main.yml | 2 +- roles/fedora-budget/build/tasks/main.yml | 2 +- roles/fedora-web/build/tasks/main.yml | 10 +++--- roles/fedora-web/fedora.im/tasks/main.yml | 2 +- roles/fedora-web/main/tasks/main.yml | 6 ++-- roles/fedora-web/ostree/tasks/main.yml | 8 ++--- roles/fedora-web/registry/tasks/main.yml | 4 +-- roles/fedora_nightlies/tasks/main.yml | 2 +- roles/fedoraloveskde/build/tasks/main.yml | 2 +- roles/flatpak-cache/tasks/main.yml | 4 +-- roles/freemedia/tasks/main.yml | 2 +- roles/geoip-city-wsgi/app/tasks/main.yml | 2 +- roles/geoip-city-wsgi/proxy/tasks/main.yml | 2 +- roles/geoip/tasks/main.yml | 2 +- roles/git/make_checkout_seed/tasks/main.yml | 2 +- roles/git/server/tasks/main.yml | 4 +-- roles/github2fedmsg/tasks/main.yml | 2 +- roles/gitolite/base/tasks/main.yml | 2 +- roles/grobisplitter/tasks/main.yml | 2 +- roles/grokmirror_mirror/tasks/main.yml | 4 +-- roles/haproxy/rewrite/tasks/main.yml | 2 +- roles/haproxy/tasks/main.yml | 2 +- roles/httpd/proxy/tasks/main.yml | 8 ++--- roles/httpd/redirectmatch/tasks/main.yml | 2 +- roles/httpd/website/tasks/main.yml | 4 +-- roles/ipa/client/tasks/main.yml | 2 +- roles/ipsilon/tasks/main.yml | 6 ++-- roles/ipsilon/tasks/patches.yml | 2 +- roles/kerneltest/tasks/main.yml | 4 +-- roles/keytab/service/tasks/main.yml | 6 ++-- roles/koji_builder/tasks/main.yml | 26 +++++++------- roles/koji_hub/tasks/main.yml | 18 +++++----- roles/kojipkgs/tasks/main.yml | 4 +-- roles/logging/tasks/main.yml | 2 +- roles/mariadb_server/tasks/main.yml | 2 +- roles/mediawiki/tasks/main.yml | 36 +++++++++---------- roles/memcached/tasks/main.yml | 2 +- roles/messaging/base/tasks/main.yml | 6 ++-- roles/mirror_pagure_ansible/tasks/main.yml | 4 +-- .../mirrorlist_proxy/tasks/main.yml | 14 ++++---- roles/mote/handlers/main.yml | 2 +- roles/mote/tasks/main.yml | 14 ++++---- roles/nagios_client/tasks/main.yml | 2 +- roles/nagios_server/tasks/main.yml | 12 +++---- roles/openqa/dispatcher/tasks/main.yml | 12 +++---- roles/openqa/server/tasks/main.yml | 12 +++---- roles/openqa/worker/tasks/createhdds.yml | 2 +- roles/openqa/worker/tasks/main.yml | 6 ++-- roles/openqa/worker/tasks/nfs-client.yml | 2 +- .../openshift-apps/coreos-ci/tasks/main.yaml | 2 +- .../fedora-coreos-pipeline/tasks/main.yaml | 2 +- roles/openshift-apps/firmitas/tasks/main.yml | 2 +- roles/openshift/object-delete/tasks/main.yml | 4 +-- roles/openshift/project/tasks/main.yml | 2 +- .../sysadmin-openshift/tasks/resources.yaml | 2 +- roles/openvpn/client/tasks/main.yml | 2 +- roles/openvpn/server/tasks/main.yml | 2 +- roles/packager_alias/tasks/main.yml | 2 +- roles/packages3/web/tasks/main.yml | 6 ++-- roles/pagure/tasks/main.yml | 16 ++++----- roles/people/tasks/main.yml | 6 ++-- roles/planet/tasks/main.yml | 22 ++++++------ roles/postgresql_server/tasks/main.yml | 2 +- roles/push-container-registry/tasks/main.yml | 2 +- roles/rabbitmq_cluster/tasks/main.yml | 6 ++-- roles/relvalconsumer/tasks/main.yml | 6 ++-- roles/repo2json/tasks/main.yml | 2 +- roles/review-stats/proxy/tasks/main.yml | 2 +- roles/robosignatory/tasks/main.yml | 10 +++--- roles/rsnapshot-push/tasks/main.yml | 2 +- roles/sigul/server/tasks/main.yml | 2 +- roles/sudo/tasks/main.yml | 2 +- roles/supybot/tasks/main.yml | 8 ++--- roles/tftp_server/tasks/main.yml | 4 +-- roles/torrent/tasks/main.yml | 2 +- roles/web-data-analysis/tasks/main.yml | 24 ++++++------- roles/weblate-backup/tasks/main.yml | 4 +-- roles/yubikey/tasks/main.yml | 2 +- roles/zabbix/zabbix_agent/tasks/main.yml | 6 ++-- .../zabbix_server/tasks/create_keytab.yml | 2 +- roles/zanata/tasks/main.yml | 2 +- tasks/aws_cloud.yml | 2 +- tasks/cloud_setup_basic.yml | 2 +- tasks/swap.yml | 4 +-- tasks/virt_instance_create.yml | 2 +- tasks/yumrepos.yml | 2 +- 167 files changed, 380 insertions(+), 381 deletions(-) diff --git a/playbooks/check-host.yml b/playbooks/check-host.yml index 6e4b1cc102..0cc3787773 100644 --- a/playbooks/check-host.yml +++ b/playbooks/check-host.yml @@ -274,11 +274,11 @@ # clean up: can also be put as handlers - name: Clean remote temp dir - file: path={{temp_dir.stdout}} state=absent + ansible.builtin.file: path={{temp_dir.stdout}} state=absent changed_when: false - name: Clean rpm temp file - file: path={{localchanges.stdout}} state=absent + ansible.builtin.file: path={{localchanges.stdout}} state=absent changed_when: false diff --git a/playbooks/groups/bodhi-backend.yml b/playbooks/groups/bodhi-backend.yml index 35360ea104..d58d0b4b5f 100644 --- a/playbooks/groups/bodhi-backend.yml +++ b/playbooks/groups/bodhi-backend.yml @@ -116,11 +116,11 @@ tasks: - name: create secondary volume dir for stg bodhi - file: dest=/mnt/koji/vol state=directory owner=apache group=apache mode=0755 + ansible.builtin.file: dest=/mnt/koji/vol state=directory owner=apache group=apache mode=0755 tags: bodhi when: env == 'staging' - name: create symlink for stg/prod secondary volume - file: src=/mnt/fedora_koji_prod/koji dest=/mnt/koji/vol/prod state=link + ansible.builtin.file: src=/mnt/fedora_koji_prod/koji dest=/mnt/koji/vol/prod state=link tags: bodhi when: env == 'staging' - import_tasks: "{{ tasks_path }}/motd.yml" diff --git a/playbooks/groups/build-kcs.yml b/playbooks/groups/build-kcs.yml index 81e07cfc02..d34b108087 100644 --- a/playbooks/groups/build-kcs.yml +++ b/playbooks/groups/build-kcs.yml @@ -20,7 +20,7 @@ tasks: - name: Make a keytab dir - file: dest="/etc/kojid-cloud-scheduler/" state=directory + ansible.builtin.file: dest="/etc/kojid-cloud-scheduler/" state=directory roles: - role: keytab/service diff --git a/playbooks/groups/debuginfod.yml b/playbooks/groups/debuginfod.yml index 4d23f87635..4ffebd847d 100644 --- a/playbooks/groups/debuginfod.yml +++ b/playbooks/groups/debuginfod.yml @@ -60,7 +60,7 @@ - restart debuginfod - name: ensure systemd drop-in directory exists - file: > + ansible.builtin.file: > dest=/etc/systemd/system/debuginfod.service.d state=directory tags: debuginfod diff --git a/playbooks/groups/download.yml b/playbooks/groups/download.yml index 4efde5c46b..2e8f85a6af 100644 --- a/playbooks/groups/download.yml +++ b/playbooks/groups/download.yml @@ -85,7 +85,7 @@ when: inventory_hostname == 'download-cc-rdu01.fedoraproject.org' - name: make a mnt/koji link - file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji + ansible.builtin.file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji when: datacenter == "iad2" handlers: diff --git a/playbooks/groups/ipa.yml b/playbooks/groups/ipa.yml index fad9624bb1..befebebe64 100644 --- a/playbooks/groups/ipa.yml +++ b/playbooks/groups/ipa.yml @@ -66,7 +66,7 @@ - krb5 - ipa/server - name: Set owner and permissions on combined keytab - file: path="/etc/krb5.HTTP_id{{env_suffix}}.fedoraproject.org.keytab.combined" + ansible.builtin.file: path="/etc/krb5.HTTP_id{{env_suffix}}.fedoraproject.org.keytab.combined" owner=apache group=apache mode=0600 diff --git a/playbooks/groups/nfs-servers.yml b/playbooks/groups/nfs-servers.yml index 62a1b75840..68ae669dc8 100644 --- a/playbooks/groups/nfs-servers.yml +++ b/playbooks/groups/nfs-servers.yml @@ -44,7 +44,7 @@ tasks: - name: Create top level directory - file: path=/srv/nfs state=directory owner=root group=root + ansible.builtin.file: path=/srv/nfs state=directory owner=root group=root tags: - drives - copr @@ -62,7 +62,7 @@ - copr - name: Create copr-be tree directory - file: path=/srv/nfs/copr-be state=directory owner=root group=root + ansible.builtin.file: path=/srv/nfs/copr-be state=directory owner=root group=root tags: - drives - copr diff --git a/playbooks/groups/oci-registry.yml b/playbooks/groups/oci-registry.yml index 0f75beb977..0a39bc271d 100644 --- a/playbooks/groups/oci-registry.yml +++ b/playbooks/groups/oci-registry.yml @@ -38,7 +38,7 @@ pre_tasks: - name: Create /srv/registry on staging since it does not use NFS - file: + ansible.builtin.file: path: /srv/registry state: directory owner: root diff --git a/playbooks/groups/os-control.yml b/playbooks/groups/os-control.yml index 2826f0d152..10d9e4d299 100644 --- a/playbooks/groups/os-control.yml +++ b/playbooks/groups/os-control.yml @@ -26,7 +26,7 @@ tasks: - name: Create the directories to hold the templates - file: + ansible.builtin.file: path: "/etc/openshift_apps" state: directory owner: root diff --git a/playbooks/groups/people.yml b/playbooks/groups/people.yml index 4fb1caba34..330c31997f 100644 --- a/playbooks/groups/people.yml +++ b/playbooks/groups/people.yml @@ -45,7 +45,7 @@ - mount - name: create /srv/home directory - file: path=/srv/home state=directory owner=root group=root + ansible.builtin.file: path=/srv/home state=directory owner=root group=root - name: bind mount home volume mount: > diff --git a/playbooks/include/proxies-fedorahosted.yml b/playbooks/include/proxies-fedorahosted.yml index 4fee04eff7..9bb760b209 100644 --- a/playbooks/include/proxies-fedorahosted.yml +++ b/playbooks/include/proxies-fedorahosted.yml @@ -14,7 +14,7 @@ tasks: - name: Ensure directories exists - file: + ansible.builtin.file: path: "{{ item }}" state: directory mode: '0755' diff --git a/playbooks/include/proxies-miscellaneous.yml b/playbooks/include/proxies-miscellaneous.yml index 24a3f8793f..e7cbdf63f0 100644 --- a/playbooks/include/proxies-miscellaneous.yml +++ b/playbooks/include/proxies-miscellaneous.yml @@ -15,7 +15,7 @@ tasks: # We retired this in favor of PDC # https://lists.fedoraproject.org/archives/list/rel-eng@lists.fedoraproject.org/thread/LOWVTF6WTS43LNPWDEISLXUELXAH5YXR/#LOWVTF6WTS43LNPWDEISLXUELXAH5YXR - - file: + - ansible.builtin.file: dest=/etc/httpd/conf.d/apps.fedoraproject.org/fedora-releng-dash.conf state=absent tags: releng-dash diff --git a/playbooks/include/proxies-reverseproxy.yml b/playbooks/include/proxies-reverseproxy.yml index 5c04c49ca2..e0a51a6b97 100644 --- a/playbooks/include/proxies-reverseproxy.yml +++ b/playbooks/include/proxies-reverseproxy.yml @@ -18,7 +18,7 @@ pre_tasks: - name: Remove some crusty files from bygone eras - file: dest=/etc/httpd/conf.d/{{item}} state=absent + ansible.builtin.file: dest=/etc/httpd/conf.d/{{item}} state=absent with_items: - meetbot.fedoraproject.org/reversepassproxy.conf - meetbot.fedoraproject.org/meetbot.conf diff --git a/playbooks/include/proxies-websites.yml b/playbooks/include/proxies-websites.yml index 8bae05066a..548ae7dbef 100644 --- a/playbooks/include/proxies-websites.yml +++ b/playbooks/include/proxies-websites.yml @@ -14,7 +14,7 @@ tasks: - name: Create /srv/web/ for all the goodies. - file: dest=/srv/web state=directory owner=root group=root mode=0755 + ansible.builtin.file: dest=/srv/web state=directory owner=root group=root mode=0755 tags: - httpd - httpd/website diff --git a/playbooks/manual/noggin-deployment/fix-home-fedora-ownerships.yml b/playbooks/manual/noggin-deployment/fix-home-fedora-ownerships.yml index b81b31bada..795014ccda 100644 --- a/playbooks/manual/noggin-deployment/fix-home-fedora-ownerships.yml +++ b/playbooks/manual/noggin-deployment/fix-home-fedora-ownerships.yml @@ -33,7 +33,7 @@ when: home_fedora_res.stat.isdir - name: Delete the script from the host - file: + ansible.builtin.file: path: /usr/local/sbin/fix-home-fedora-ownerships.sh state: absent changed_when: false diff --git a/playbooks/manual/noggin-deployment/uninstall_ipa_client.yml b/playbooks/manual/noggin-deployment/uninstall_ipa_client.yml index 6171b84650..9dd023d566 100644 --- a/playbooks/manual/noggin-deployment/uninstall_ipa_client.yml +++ b/playbooks/manual/noggin-deployment/uninstall_ipa_client.yml @@ -61,7 +61,7 @@ tasks: - name: Remove keytab - file: + ansible.builtin.file: path: "/etc/openshift_apps/{{item.app}}/{{item.key}}.kt" state: absent loop: "{{keytabs}}" diff --git a/playbooks/manual/ocp4-place-ignitionfiles.yml b/playbooks/manual/ocp4-place-ignitionfiles.yml index 2e7b4e53d5..1a484d54ec 100644 --- a/playbooks/manual/ocp4-place-ignitionfiles.yml +++ b/playbooks/manual/ocp4-place-ignitionfiles.yml @@ -23,7 +23,7 @@ tasks: - block: - name: == OCP KVM provisioning == Ensuring we have needed httpd dir - file: + ansible.builtin.file: path: "/var/www/html/rhcos" state: directory mode: "0755" @@ -58,7 +58,7 @@ - "rhcos-{{ rhcos_version }}-x86_64-metal.x86_64.raw.gz" - "rhcos-{{ rhcos_version }}-x86_64-live-kernel-x86_64" - name: == OCP KVM provisioning == Ensuring symlink for correct version {{ rhcos_version }} - file: + ansible.builtin.file: state: link src: "/var/www/html/rhcos/rhcos-{{ rhcos_version }}-x86_64-metal.x86_64.raw.gz" dest: "/var/www/html/rhcos/rhcos-metal.raw" diff --git a/playbooks/manual/rebuild/hotspot.yml b/playbooks/manual/rebuild/hotspot.yml index 1b6b2f3d60..287f52d086 100644 --- a/playbooks/manual/rebuild/hotspot.yml +++ b/playbooks/manual/rebuild/hotspot.yml @@ -8,5 +8,5 @@ - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml tasks: - - file: dest=/srv/web/fedoraproject.org/static/ state=directory + - ansible.builtin.file: dest=/srv/web/fedoraproject.org/static/ state=directory - copy: src=hotspot.txt dest=/srv/web/fedoraproject.org/static/hotspot.txt diff --git a/playbooks/manual/rebuild/mote.yml b/playbooks/manual/rebuild/mote.yml index 2b788f6347..0fcc0c5f14 100644 --- a/playbooks/manual/rebuild/mote.yml +++ b/playbooks/manual/rebuild/mote.yml @@ -10,6 +10,6 @@ - import_tasks: "{{ handlers_path }}/restart_services.yml" tasks: - - file: dest=/var/cache/httpd/mote/cache.json state=absent + - ansible.builtin.file: dest=/var/cache/httpd/mote/cache.json state=absent - service: name="httpd" state=restarted - service: name="mote-updater" state=restarted diff --git a/playbooks/manual/remote_delldrive.yml b/playbooks/manual/remote_delldrive.yml index 20697de7dd..01456597da 100644 --- a/playbooks/manual/remote_delldrive.yml +++ b/playbooks/manual/remote_delldrive.yml @@ -17,6 +17,6 @@ register: out - name: Remove it - file: path=/root/drivestatus.py state=absent + ansible.builtin.file: path=/root/drivestatus.py state=absent - debug: var=out.stdout_lines diff --git a/playbooks/manual/sign-and-import.yml b/playbooks/manual/sign-and-import.yml index e554f00c55..37a6e58838 100644 --- a/playbooks/manual/sign-and-import.yml +++ b/playbooks/manual/sign-and-import.yml @@ -44,7 +44,7 @@ shell: /bin/rpm --resign {{ rpmdir }}/*.rpm - name: Make a directory where we store the rpms afterwards - file: path={{ rpmdir }}-old state=directory + ansible.builtin.file: path={{ rpmdir }}-old state=directory - name: Copy the source rpms to the SRPMS dir of {{ repodir }} copy: src={{ item }} dest={{ repodir }}/SRPMS/ diff --git a/playbooks/manual/staging-sync/bodhi.yml b/playbooks/manual/staging-sync/bodhi.yml index 95a8ffa565..1387c90274 100644 --- a/playbooks/manual/staging-sync/bodhi.yml +++ b/playbooks/manual/staging-sync/bodhi.yml @@ -64,7 +64,7 @@ - command: createdb -O bodhi2 bodhi2 - name: Import the prod db. shell: cat /var/tmp/bodhi2.dump | psql bodhi2 - - file: path=/var/tmp/bodhi2.dump state=absent + - ansible.builtin.file: path=/var/tmp/bodhi2.dump state=absent - name: Bring staging services up (OpenShift web services) hosts: os-control01.stg.iad2.fedoraproject.org diff --git a/playbooks/manual/staging-sync/koji.yml b/playbooks/manual/staging-sync/koji.yml index 9c4b77cdb9..0e53e63015 100644 --- a/playbooks/manual/staging-sync/koji.yml +++ b/playbooks/manual/staging-sync/koji.yml @@ -112,7 +112,7 @@ - name: Mount newly-created empty koji filesystem mount: name=/mnt/fedora_koji src=/dev/GuestVolGroup00/fedora_koji fstype=xfs state=mounted - name: Recreate koji directory structure - file: name={{item}} state=directory owner=apache group=apache setype=httpd_sys_rw_content_t + ansible.builtin.file: name={{item}} state=directory owner=apache group=apache setype=httpd_sys_rw_content_t with_items: - /mnt/fedora_koji/koji - /mnt/koji/compose @@ -125,7 +125,7 @@ - /mnt/koji/work # TODO recreate directories under /mnt/koji/compose (which ones?) that composer expects to exist - name: Symlink production volume - file: src=/mnt/fedora_koji_prod/koji dest=/mnt/koji/vol/prod state=link + ansible.builtin.file: src=/mnt/fedora_koji_prod/koji dest=/mnt/koji/vol/prod state=link - name: Restart nfs-server service: name=nfs-server state=started - name: Restart httpd diff --git a/playbooks/manual/staging-sync/mailman.yml b/playbooks/manual/staging-sync/mailman.yml index 8e014659a9..dfdd5dfbdc 100644 --- a/playbooks/manual/staging-sync/mailman.yml +++ b/playbooks/manual/staging-sync/mailman.yml @@ -77,7 +77,7 @@ tasks: - name: Nuke the prod db dump that we cached on batcave - file: path=/var/tmp/prod-mailman-dump/ state=absent + ansible.builtin.file: path=/var/tmp/prod-mailman-dump/ state=absent - name: Convert the data to staging and bring services back up. This will take a while too. diff --git a/playbooks/manual/update-firmware.yml b/playbooks/manual/update-firmware.yml index cb4f4b4a50..c688d988c3 100644 --- a/playbooks/manual/update-firmware.yml +++ b/playbooks/manual/update-firmware.yml @@ -52,7 +52,7 @@ - name: Create drop place for upgrades check_mode: no when: ansible_virtualization_role == "host" - file: path=/root/firmware-upgrades state=directory + ansible.builtin.file: path=/root/firmware-upgrades state=directory - name: Check which updates to copy check_mode: no @@ -98,7 +98,7 @@ # Generic stuff continues here - name: Mark updates as done - file: path=/root/firmware-upgrades/{{ item.item.1 }}.applied + ansible.builtin.file: path=/root/firmware-upgrades/{{ item.item.1 }}.applied state=touch owner=root mode=644 when: "'stat' in item and not item.stat.exists" with_items: "{{is_applied_results.results}}" @@ -106,7 +106,7 @@ # We are cleaning up all files we copied, regardless of update result - name: Delete update files check_mode: no - file: path=/root/firmware-upgrades/{{ item.item.1 }} + ansible.builtin.file: path=/root/firmware-upgrades/{{ item.item.1 }} state=absent when: "'stat' in item and not item.stat.exists" with_items: "{{is_applied_results.results}}" diff --git a/roles/abrt/faf-post/tasks/main.yml b/roles/abrt/faf-post/tasks/main.yml index 57d52be3bc..33c120dc6d 100644 --- a/roles/abrt/faf-post/tasks/main.yml +++ b/roles/abrt/faf-post/tasks/main.yml @@ -4,7 +4,7 @@ - import_tasks: repositories.yml - name: Ensure directory for FAF database backups exists - file: + ansible.builtin.file: path: "{{ faf_backup_dir }}" state: directory owner: faf diff --git a/roles/abrt/faf-pre/tasks/main.yml b/roles/abrt/faf-pre/tasks/main.yml index 3cdec63a37..722817d5be 100644 --- a/roles/abrt/faf-pre/tasks/main.yml +++ b/roles/abrt/faf-pre/tasks/main.yml @@ -11,14 +11,14 @@ - import_tasks: services.yml - name: Create a directory /srv/faf - file: + ansible.builtin.file: path: /srv/faf state: directory owner: faf group: faf - name: Create folders where we place certs for fedora-messaging - file: path=/etc/fedora-messaging/faf owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/fedora-messaging/faf owner=root group=root mode=0755 state=directory - name: Install certs for fedora-messaging copy: src={{ item.src }} diff --git a/roles/abrt/faf/tasks/config.yml b/roles/abrt/faf/tasks/config.yml index 0ecb28f85f..4b01ba1c8e 100644 --- a/roles/abrt/faf/tasks/config.yml +++ b/roles/abrt/faf/tasks/config.yml @@ -7,7 +7,7 @@ # setup fedora-messaging - name: Create the config folder for fedora-messaging - file: + ansible.builtin.file: path: /etc/fedora-messaging/ owner: root group: root diff --git a/roles/abrt/retrace-post/tasks/retrace_setup.yml b/roles/abrt/retrace-post/tasks/retrace_setup.yml index de86110fee..1714aef4cc 100644 --- a/roles/abrt/retrace-post/tasks/retrace_setup.yml +++ b/roles/abrt/retrace-post/tasks/retrace_setup.yml @@ -17,21 +17,21 @@ tags: [rs_reposync, rs_fedora] when: env != 'staging' -- file: +- ansible.builtin.file: path: /srv/retrace/repos state: directory mode: "0755" owner: retrace group: retrace -- file: +- ansible.builtin.file: path: /srv/retrace/tasks state: directory mode: "0755" owner: retrace group: retrace -- file: +- ansible.builtin.file: path: /srv/retrace/hardlink-local state: directory mode: "0755" diff --git a/roles/abrt/retrace-pre/tasks/main.yml b/roles/abrt/retrace-pre/tasks/main.yml index 0fdc685a48..4c1a5239de 100644 --- a/roles/abrt/retrace-pre/tasks/main.yml +++ b/roles/abrt/retrace-pre/tasks/main.yml @@ -44,7 +44,7 @@ state: started - name: Create directory for repositories - file: + ansible.builtin.file: path: /srv/retrace/repos state: directory mode: "0755" @@ -52,14 +52,14 @@ group: retrace - name: Create directory for retrace tasks - file: + ansible.builtin.file: path: /srv/retrace/tasks state: directory mode: "0755" owner: retrace group: retrace -- file: +- ansible.builtin.file: path: /srv/retrace/hardlink-local state: directory mode: "0755" diff --git a/roles/apps-fp-o/tasks/main.yml b/roles/apps-fp-o/tasks/main.yml index 278e856d96..e6ba3a7429 100644 --- a/roles/apps-fp-o/tasks/main.yml +++ b/roles/apps-fp-o/tasks/main.yml @@ -14,7 +14,7 @@ - apps-fp-o - name: Ensure directory exixts - file: + ansible.builtin.file: path: "{{ item }}" state: directory mode: '2755' diff --git a/roles/base/tasks/keytab.yml b/roles/base/tasks/keytab.yml index 71bcaf5d26..56f348d194 100644 --- a/roles/base/tasks/keytab.yml +++ b/roles/base/tasks/keytab.yml @@ -88,7 +88,7 @@ - name: Destroy stored keytab delegate_to: "{{ ipa_server }}" - file: path=/tmp/{{inventory_hostname}}.kt state=absent + ansible.builtin.file: path=/tmp/{{inventory_hostname}}.kt state=absent tags: - base - config @@ -114,7 +114,7 @@ when: not host_keytab_status.stat.exists - name: Set keytab permissions - file: path=/etc/krb5.keytab owner=root group=root mode=0600 + ansible.builtin.file: path=/etc/krb5.keytab owner=root group=root mode=0600 tags: - base - config @@ -122,7 +122,7 @@ when: not host_keytab_status.stat.exists - name: Destroy encoded keytab - file: path=/etc/krb5.keytab.b64 state=absent + ansible.builtin.file: path=/etc/krb5.keytab.b64 state=absent tags: - base - config diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 13f4be348f..4e81ee9caf 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -238,7 +238,7 @@ when: baseiptables|bool - name: Enable journald persistence - file: path=/var/log/journal state=directory + ansible.builtin.file: path=/var/log/journal state=directory owner=root group=systemd-journal mode=2755 when: ansible_distribution_major_version|int >= 7 and ansible_distribution == 'RedHat' tags: @@ -249,7 +249,7 @@ - flush journald tmpfiles to persistent store - name: Enable journald persistence - file: path=/var/log/journal state=directory + ansible.builtin.file: path=/var/log/journal state=directory owner=root group=systemd-journal mode=2755 when: ansible_distribution_major_version|int >= 29 and ansible_distribution == 'Fedora' tags: @@ -341,7 +341,7 @@ - base - name: Rsyslogd make systemd limits directory for file handles - file: dest=/etc/systemd/system/rsyslog.service.d/ mode=0755 owner=root group=root state=directory + ansible.builtin.file: dest=/etc/systemd/system/rsyslog.service.d/ mode=0755 owner=root group=root state=directory when: inventory_hostname.startswith('log') or inventory_hostname.startswith('people') tags: - rsyslogd @@ -357,7 +357,7 @@ # Custom selinux policy to allow rsyslog to read and send audit to log01 - name: Ensure a directory exists for our custom selinux module - file: dest=/usr/local/share/rsyslog state=directory + ansible.builtin.file: dest=/usr/local/share/rsyslog state=directory tags: - rsyslogd - config @@ -504,7 +504,7 @@ # is actually expired, and kinit's still not refreshing them and such alike. # Let's just nuke it for now. - name: We do NOT use sssd-kcm - file: path=/etc/krb5.conf.d/kcm_default_ccache state=absent + ansible.builtin.file: path=/etc/krb5.conf.d/kcm_default_ccache state=absent tags: - base - config diff --git a/roles/basessh/tasks/main.yml b/roles/basessh/tasks/main.yml index da1a1c4bd8..8ff9886868 100644 --- a/roles/basessh/tasks/main.yml +++ b/roles/basessh/tasks/main.yml @@ -156,7 +156,7 @@ - base - name: Create directory for storing pubkeys - file: path="{{pubkeydir}}" + ansible.builtin.file: path="{{pubkeydir}}" owner=root group=root mode=0600 diff --git a/roles/batcave/tasks/main.yml b/roles/batcave/tasks/main.yml index 65289cc09c..a4f886a06b 100644 --- a/roles/batcave/tasks/main.yml +++ b/roles/batcave/tasks/main.yml @@ -8,7 +8,7 @@ --- - name: Create /srv/web/pub for nfs mounts - file: dest=/srv/web/pub state=directory mode=0755 + ansible.builtin.file: dest=/srv/web/pub state=directory mode=0755 tags: - batcave - config @@ -129,7 +129,7 @@ - fedora-messaging - name: Create folder where we'll place the certs - file: path=/etc/pki/rabbitmq/ owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/pki/rabbitmq/ owner=root group=root mode=0755 state=directory tags: - batcave - config @@ -372,7 +372,7 @@ # - name: Create repo2json directory - file: dest=/srv/web/repo/json mode=0755 state=directory owner=apache group=apache + ansible.builtin.file: dest=/srv/web/repo/json mode=0755 state=directory owner=apache group=apache tags: - batcave - config @@ -557,14 +557,14 @@ - batcave - name: Create some tmp dirs - file: path=/tmp-inst mode=000 owner=root group=root state=directory + ansible.builtin.file: path=/tmp-inst mode=000 owner=root group=root state=directory tags: - config - batcave - selinux - name: Create some tmp dirs - file: path=/var/tmp-inst mode=000 owner=root group=root state=directory + ansible.builtin.file: path=/var/tmp-inst mode=000 owner=root group=root state=directory tags: - config - batcave @@ -578,7 +578,7 @@ - selinux - name: Create the /var/tmux folder for shared tmux session - file: path=/var/tmux mode=2774 owner=root group=sysadmin state=directory + ansible.builtin.file: path=/var/tmux mode=2774 owner=root group=sysadmin state=directory tags: - batcave - tmux @@ -590,7 +590,7 @@ - tmux - name: Create dir for openshift pxe boot files - file: path=/srv/web/infra/bigfiles/{{item}} mode=2660 owner=root group=sysadmin-openshift state=directory + ansible.builtin.file: path=/srv/web/infra/bigfiles/{{item}} mode=2660 owner=root group=sysadmin-openshift state=directory with_items: - openshiftboot - tftpboot/rhcos diff --git a/roles/bodhi2/backend/tasks/main.yml b/roles/bodhi2/backend/tasks/main.yml index 2f21d819c7..ad9d782546 100644 --- a/roles/bodhi2/backend/tasks/main.yml +++ b/roles/bodhi2/backend/tasks/main.yml @@ -330,7 +330,7 @@ - bodhi - name: Create /etc/pki/fedora-messaging - file: + ansible.builtin.file: dest: /etc/pki/fedora-messaging mode: "0775" owner: root @@ -382,12 +382,12 @@ - bodhi - name: Make a mnt/koji link - file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji force=yes + ansible.builtin.file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji force=yes tags: - bodhi - name: Create /etc/systemd/system/fm-consumer@.service.d - file: + ansible.builtin.file: state: directory path: /etc/systemd/system/fm-consumer@.service.d owner: root diff --git a/roles/bodhi2/base/tasks/main.yml b/roles/bodhi2/base/tasks/main.yml index ad3b0f2db3..c62d67f06d 100644 --- a/roles/bodhi2/base/tasks/main.yml +++ b/roles/bodhi2/base/tasks/main.yml @@ -3,7 +3,7 @@ # This is the base set of files needed for bodhi - name: Create the bodhi configuration directory - file: + ansible.builtin.file: path: /etc/bodhi state: directory owner: root diff --git a/roles/btrfs/tasks/main.yml b/roles/btrfs/tasks/main.yml index 17fe8b2cfa..34cf837b0f 100644 --- a/roles/btrfs/tasks/main.yml +++ b/roles/btrfs/tasks/main.yml @@ -7,7 +7,7 @@ - name: Create /etc/systemd/system/btrfs-balance.timer.d - file: + ansible.builtin.file: state: directory path: /etc/systemd/system/btrfs-balance.timer.d owner: root diff --git a/roles/bugzilla2fedmsg/tasks/main.yml b/roles/bugzilla2fedmsg/tasks/main.yml index 92a360968b..f694654a07 100644 --- a/roles/bugzilla2fedmsg/tasks/main.yml +++ b/roles/bugzilla2fedmsg/tasks/main.yml @@ -22,7 +22,7 @@ - bugzilla2fedmsg - name: Make sure a few directories exist. - file: + ansible.builtin.file: dest="{{ item }}" owner=fedmsg group=fedmsg diff --git a/roles/builder_repo/tasks/main.yml b/roles/builder_repo/tasks/main.yml index 960b15ff7b..917a89e8ef 100644 --- a/roles/builder_repo/tasks/main.yml +++ b/roles/builder_repo/tasks/main.yml @@ -1,5 +1,5 @@ --- - name: Add builder infra yum repo - file: dest=/etc/yum.repos.d/builder-infrastructure.repo state=absent + ansible.builtin.file: dest=/etc/yum.repos.d/builder-infrastructure.repo state=absent tags: - builder_infra diff --git a/roles/centosci-keytab/tasks/main.yml b/roles/centosci-keytab/tasks/main.yml index ec3bd4f088..2e8bb9b9c6 100644 --- a/roles/centosci-keytab/tasks/main.yml +++ b/roles/centosci-keytab/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Create the CentosCIAuthorization operator keytab path - file: + ansible.builtin.file: path: "/etc/openshift_apps/centos-ci-authorization/" state: directory owner: root diff --git a/roles/cgit/base/tasks/main.yml b/roles/cgit/base/tasks/main.yml index a85d98ea94..bbd6ce31be 100644 --- a/roles/cgit/base/tasks/main.yml +++ b/roles/cgit/base/tasks/main.yml @@ -13,11 +13,11 @@ # See https://github.com/robyduck/cgit-custom - name: Make sure cgit directory exists - file: dest=/usr/share/cgit state=directory owner=root group=root mode=0755 + ansible.builtin.file: dest=/usr/share/cgit state=directory owner=root group=root mode=0755 tags: cgit - name: Make sure cgit images directory exists - file: dest=/usr/share/cgit/images state=directory owner=root group=root mode=0755 + ansible.builtin.file: dest=/usr/share/cgit/images state=directory owner=root group=root mode=0755 tags: cgit - name: Copy cgit them into place. diff --git a/roles/cgit/make_pkgs_list/tasks/main.yml b/roles/cgit/make_pkgs_list/tasks/main.yml index 608eaeaff5..2eec93896e 100644 --- a/roles/cgit/make_pkgs_list/tasks/main.yml +++ b/roles/cgit/make_pkgs_list/tasks/main.yml @@ -6,7 +6,7 @@ tags: cgit - name: Create the git root directory (/srv/git) - file: dest=/srv/git state=directory mode=0755 + ansible.builtin.file: dest=/srv/git state=directory mode=0755 tags: cgit - name: Ensure the repo list file exists diff --git a/roles/check-compose/tasks/main.yml b/roles/check-compose/tasks/main.yml index e53c23226c..e8338c89e3 100644 --- a/roles/check-compose/tasks/main.yml +++ b/roles/check-compose/tasks/main.yml @@ -137,7 +137,7 @@ - restart check-compose - name: Create /etc/pki/fedora-messaging - file: + ansible.builtin.file: dest: /etc/pki/fedora-messaging mode: "0775" owner: root diff --git a/roles/collectd/base/tasks/main.yml b/roles/collectd/base/tasks/main.yml index 0a89fd37e6..90d5922041 100644 --- a/roles/collectd/base/tasks/main.yml +++ b/roles/collectd/base/tasks/main.yml @@ -119,7 +119,7 @@ # Three tasks for handling our (two) custom selinux modules. - name: Ensure a directory exists for our custom selinux module - file: dest=/usr/share/collectd state=directory + ansible.builtin.file: dest=/usr/share/collectd state=directory tags: - collectd - selinux diff --git a/roles/collectd/fcomm-queue/tasks/main.yml b/roles/collectd/fcomm-queue/tasks/main.yml index bf9b25bec1..4868808149 100644 --- a/roles/collectd/fcomm-queue/tasks/main.yml +++ b/roles/collectd/fcomm-queue/tasks/main.yml @@ -24,7 +24,7 @@ # Three tasks for handling our custom selinux module. - name: Ensure a directory exists for our custom selinux module - file: dest=/usr/share/collectd state=directory + ansible.builtin.file: dest=/usr/share/collectd state=directory tags: - collectd - selinux diff --git a/roles/collectd/server/tasks/main.yml b/roles/collectd/server/tasks/main.yml index 7ec258713e..06b094c64e 100644 --- a/roles/collectd/server/tasks/main.yml +++ b/roles/collectd/server/tasks/main.yml @@ -73,7 +73,7 @@ # create /var/log/collectd as it's on a larger volume - name: Create /var/log/collectd - file: path=/var/log/collectd owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/var/log/collectd owner=root group=root mode=0755 state=directory tags: - config - collectd/server @@ -88,7 +88,7 @@ - collectd/server - name: Create the service configuration directory - file: + ansible.builtin.file: path: /etc/systemd/system/collectd.service.d state: directory tags: diff --git a/roles/communishift/tasks/deploy-communishift-authorization-operator.yml b/roles/communishift/tasks/deploy-communishift-authorization-operator.yml index 33a66fae94..16bac1a03d 100644 --- a/roles/communishift/tasks/deploy-communishift-authorization-operator.yml +++ b/roles/communishift/tasks/deploy-communishift-authorization-operator.yml @@ -11,7 +11,7 @@ - deploy-operators - name: Create the CommunishiftAuthorization operator keytab path - file: + ansible.builtin.file: path: "/etc/openshift_apps/communishift-authorization/" state: directory owner: root diff --git a/roles/copr/backend/files/provision/provision_builder_tasks.yml b/roles/copr/backend/files/provision/provision_builder_tasks.yml index 37991bcb10..0d86f6d7d5 100644 --- a/roles/copr/backend/files/provision/provision_builder_tasks.yml +++ b/roles/copr/backend/files/provision/provision_builder_tasks.yml @@ -35,12 +35,12 @@ - starting_builder - name: work-around for wrongly generated ami - file: + ansible.builtin.file: path: /etc/yum.repos.d/pr.repo state: absent - name: disable updates-testing - file: + ansible.builtin.file: path: /etc/yum.repos.d/fedora-updates-testing.repo state: absent when: @@ -55,7 +55,7 @@ register: system_updated - name: disable updates-testing, could be restored after update - file: + ansible.builtin.file: path: /etc/yum.repos.d/fedora-updates-testing.repo state: absent when: system_updated.changed @@ -174,7 +174,7 @@ - name: check disk space include_tasks: - file: check_path_free_space.yml + ansible.builtin.file: check_path_free_space.yml vars: path: "{{ item.path }}" size: "{{ item.size|int }}" @@ -241,7 +241,7 @@ - preparing_image - name: mockbuilder .ssh - file: state=directory path=/home/mockbuilder/.ssh mode=0700 owner=mockbuilder group=mockbuilder + ansible.builtin.file: state=directory path=/home/mockbuilder/.ssh mode=0700 owner=mockbuilder group=mockbuilder when: - preparing_image diff --git a/roles/copr/backend/handlers/main.yml b/roles/copr/backend/handlers/main.yml index 6d01b64c64..c165181b3f 100644 --- a/roles/copr/backend/handlers/main.yml +++ b/roles/copr/backend/handlers/main.yml @@ -1,6 +1,6 @@ --- - name: chmod_key - file: path=/etc/lighttpd/copr-be.fedoraproject.org.pem owner=root group=root mode=0600 + ansible.builtin.file: path=/etc/lighttpd/copr-be.fedoraproject.org.pem owner=root group=root mode=0600 - name: restart copr-backend service: name="{{ copr_backend_target }}" state=restarted diff --git a/roles/copr/backend/tasks/aws.yml b/roles/copr/backend/tasks/aws.yml index 4b9602fdb7..c06555330c 100644 --- a/roles/copr/backend/tasks/aws.yml +++ b/roles/copr/backend/tasks/aws.yml @@ -3,7 +3,7 @@ dnf: state=present name=awscli - name: Create aws HOME config directory - file: state=directory + ansible.builtin.file: state=directory path="{{ item.homedir }}/.aws" owner={{ item.user }} group={{ item.user }} diff --git a/roles/copr/backend/tasks/copr-ping.yml b/roles/copr/backend/tasks/copr-ping.yml index 9b7adef545..aaf555855d 100644 --- a/roles/copr/backend/tasks/copr-ping.yml +++ b/roles/copr/backend/tasks/copr-ping.yml @@ -15,7 +15,7 @@ tags: copr_ping - name: Pre-create ping log file - file: + ansible.builtin.file: path: "{{ ping_log }}" owner: "{{ ping_user }}" group: nagios @@ -61,7 +61,7 @@ tags: copr_ping - name: Create home/.config dir - file: + ansible.builtin.file: path: "{{ ping_homedir }}/.config" owner: "{{ ping_user }}" group: "{{ ping_user }}" diff --git a/roles/copr/backend/tasks/main.yml b/roles/copr/backend/tasks/main.yml index 0b58db4fef..eb6aafa865 100644 --- a/roles/copr/backend/tasks/main.yml +++ b/roles/copr/backend/tasks/main.yml @@ -44,13 +44,13 @@ when: devel|bool - name: Make copr dirs - file: state=directory path={{ item }} + ansible.builtin.file: state=directory path={{ item }} with_items: - /var/lib/copr/jobs - /var/lib/copr/public_html/results - name: Setup dirs there - file: state=directory path="/home/copr/{{ item }}" owner=copr group=copr mode=0700 + ansible.builtin.file: state=directory path="/home/copr/{{ item }}" owner=copr group=copr mode=0700 with_items: - cloud - .ssh @@ -77,7 +77,7 @@ ignore_errors: yes - name: Create empty known_hosts - file: state=touch dest=/home/copr/.ssh/known_hosts owner=copr group=copr mode=600 + ansible.builtin.file: state=touch dest=/home/copr/.ssh/known_hosts owner=copr group=copr mode=600 when: hostsstat.rc == 1 - name: Replace bashrc for copr user @@ -118,7 +118,7 @@ seboolean: name=httpd_setrlimit state=yes persistent=yes - name: Create directory for compress module of lighttpd - file: path=/var/cache/lighttpd/compress owner=lighttpd group=lighttpd mode=0644 state=directory + ansible.builtin.file: path=/var/cache/lighttpd/compress owner=lighttpd group=lighttpd mode=0644 state=directory # mime default to text/plain and enable dirlisting for indexes - name: Update lighttpd configs @@ -168,7 +168,7 @@ # setup dirs for the ansible execution off of provisioning # - name: Dirs from provision -# file: state=directory path="/home/copr/provision/{{ item }}" owner=copr group=copr +# ansible.builtin.file: state=directory path="/home/copr/provision/{{ item }}" owner=copr group=copr # with_items: # - action_plugins # - library @@ -248,7 +248,7 @@ - provision_config - name: Create messaging config directory - file: dest=/etc/copr/msgbuses state=directory owner=copr group=copr mode=0700 + ansible.builtin.file: dest=/etc/copr/msgbuses state=directory owner=copr group=copr mode=0700 when: copr_messaging tags: - config @@ -357,7 +357,7 @@ # Three tasks for handling our custom selinux module - name: Ensure a directory exists for our custom selinux module - file: dest=/usr/local/share/copr state=directory + ansible.builtin.file: dest=/usr/local/share/copr state=directory - name: Copy over our custom selinux module copy: src=selinux/copr_rules.pp dest=/usr/local/share/copr/copr_rules.pp diff --git a/roles/copr/backend/tasks/mount_fs.yml b/roles/copr/backend/tasks/mount_fs.yml index 073466f191..9c833c69e1 100644 --- a/roles/copr/backend/tasks/mount_fs.yml +++ b/roles/copr/backend/tasks/mount_fs.yml @@ -70,7 +70,7 @@ notify: systemctl daemon-reload - name: Prepare mount point - file: state=directory path=/var/lib/copr/public_html + ansible.builtin.file: state=directory path=/var/lib/copr/public_html - name: Mount up disk of copr repo mount: name=/var/lib/copr/public_html src='LABEL=copr-repo' fstype=ext4 state=mounted opts=nofail diff --git a/roles/copr/backend/tasks/pulp.yml b/roles/copr/backend/tasks/pulp.yml index 84a4ce2711..8dec9290a6 100644 --- a/roles/copr/backend/tasks/pulp.yml +++ b/roles/copr/backend/tasks/pulp.yml @@ -5,7 +5,7 @@ # dnf: state=present name=pulp-cli - name: Create pulp config directory - file: + ansible.builtin.file: state: directory path: /home/copr/.config/pulp/ owner: copr diff --git a/roles/copr/backend/tasks/resalloc.yml b/roles/copr/backend/tasks/resalloc.yml index bb1440f14d..ef52692ce1 100644 --- a/roles/copr/backend/tasks/resalloc.yml +++ b/roles/copr/backend/tasks/resalloc.yml @@ -131,7 +131,7 @@ - provision_config - name: Resalloc, ssh directory - file: + ansible.builtin.file: path: /var/lib/resallocserver/.ssh state: directory mode: "0700" diff --git a/roles/copr/backend/tasks/setup_provisioning_environment.yml b/roles/copr/backend/tasks/setup_provisioning_environment.yml index f2c263b600..e649cd6cea 100644 --- a/roles/copr/backend/tasks/setup_provisioning_environment.yml +++ b/roles/copr/backend/tasks/setup_provisioning_environment.yml @@ -82,7 +82,7 @@ - provision_config - name: Remove currently unused and broken os_nova filter - file: state=absent + ansible.builtin.file: state=absent path="{{ provision_directory }}/filter_plugins/os_nova.py" tags: - provision_config diff --git a/roles/copr/certbot/tasks/letsencrypt.yml b/roles/copr/certbot/tasks/letsencrypt.yml index 306cc6f222..ef78321d6b 100644 --- a/roles/copr/certbot/tasks/letsencrypt.yml +++ b/roles/copr/certbot/tasks/letsencrypt.yml @@ -130,7 +130,7 @@ - name: Prepare the certbot backup directory on batcave delegate_to: localhost - file: + ansible.builtin.file: path: "{{ le_backup_path }}" # nobody, except for root, can step into this directory (on batcave) mode: "0700" diff --git a/roles/copr/dist_git/tasks/main.yml b/roles/copr/dist_git/tasks/main.yml index 2863ad219e..8e0b1f07e3 100644 --- a/roles/copr/dist_git/tasks/main.yml +++ b/roles/copr/dist_git/tasks/main.yml @@ -36,7 +36,7 @@ selinux: policy=targeted state=enforcing - name: Make sure directories are owned by copr-dist-git user - file: path={{ item }} owner=copr-dist-git group=copr-dist-git state=directory recurse=yes + ansible.builtin.file: path={{ item }} owner=copr-dist-git group=copr-dist-git state=directory recurse=yes with_items: - /var/log/copr-dist-git/ @@ -114,7 +114,7 @@ when: not services_disabled|bool - name: Create place for our custom SELinux policy - file: path=/usr/local/share/selinux state=directory + ansible.builtin.file: path=/usr/local/share/selinux state=directory - name: Copy over our custom selinux policy for cgit copy: src=git_script_t.pp dest=/usr/local/share/selinux/git_script_t.pp @@ -132,7 +132,7 @@ command: /usr/bin/copr-dist-git-refresh-cgit creates=/var/cache/cgit/repo-configuration.rc - name: Ensure that .config directory exists - file: path=/home/copr-dist-git/.config state=directory + ansible.builtin.file: path=/home/copr-dist-git/.config state=directory - name: Install .config/copr for copr-dist-git user (required for pruning) template: src="copr.conf" dest="/home/copr-dist-git/.config/copr" owner=copr-dist-git group=copr-dist-git @@ -161,7 +161,7 @@ - cron - name: Drop monthly cron job - file: + ansible.builtin.file: path: /etc/cron.monthly/copr-dist-git state: absent tags: diff --git a/roles/copr/dist_git/tasks/mount_fs.yml b/roles/copr/dist_git/tasks/mount_fs.yml index 619f23189c..cd2c674cca 100644 --- a/roles/copr/dist_git/tasks/mount_fs.yml +++ b/roles/copr/dist_git/tasks/mount_fs.yml @@ -1,15 +1,15 @@ --- - name: Prepare mount point - file: state=directory path=/var/lib/dist-git + ansible.builtin.file: state=directory path=/var/lib/dist-git - name: Mount up disk of copr repo mount: name=/var/lib/dist-git src='LABEL=copr-dist-git' fstype=ext4 state=mounted - name: Prepare mount point - file: state=directory path=/var/lib/copr-dist-git + ansible.builtin.file: state=directory path=/var/lib/copr-dist-git - name: Create symlink for per-task-logs - file: + ansible.builtin.file: state: link src: /var/lib/dist-git/per-task-logs path: /var/lib/copr-dist-git/per-task-logs diff --git a/roles/copr/frontend/tasks/httpd.yml b/roles/copr/frontend/tasks/httpd.yml index f98b844b57..e52ec59a37 100644 --- a/roles/copr/frontend/tasks/httpd.yml +++ b/roles/copr/frontend/tasks/httpd.yml @@ -11,7 +11,7 @@ - certbot - name: Drop old and now unused coprs_ssl.conf - file: path=/etc/httpd/conf.d/coprs_ssl.conf state=absent + ansible.builtin.file: path=/etc/httpd/conf.d/coprs_ssl.conf state=absent notify: - reload httpd tags: diff --git a/roles/copr/frontend/tasks/main.yml b/roles/copr/frontend/tasks/main.yml index 0623701b47..5fc79f6792 100644 --- a/roles/copr/frontend/tasks/main.yml +++ b/roles/copr/frontend/tasks/main.yml @@ -76,11 +76,11 @@ # tags: patches - name: Directory for postgresql dumps - file: state=directory path=/var/www/html/db_dumps/ + ansible.builtin.file: state=directory path=/var/www/html/db_dumps/ owner=copr-fe mode=755 - name: Directory for usage graphs - file: state=directory path=/var/www/html/usage/ + ansible.builtin.file: state=directory path=/var/www/html/usage/ owner=copr-fe mode=755 - name: Install copr configs @@ -176,7 +176,7 @@ when: update_indexes_required_result.rc != 0 - name: Make sure /etc/fedora-messaging directory exists - file: path=/etc/fedora-messaging state=directory + ansible.builtin.file: path=/etc/fedora-messaging state=directory - name: Install fedora messaging config for Copr template: src="fedora-messaging/copr_messaging.toml" dest="/etc/fedora-messaging/copr_messaging.toml" diff --git a/roles/copr/frontend/tasks/psql_setup.yml b/roles/copr/frontend/tasks/psql_setup.yml index fd1c0268a9..e753aa0972 100644 --- a/roles/copr/frontend/tasks/psql_setup.yml +++ b/roles/copr/frontend/tasks/psql_setup.yml @@ -22,7 +22,7 @@ - config - name: Ensure postgres has a place to backup to - file: dest=/backups state=directory owner=postgres + ansible.builtin.file: dest=/backups state=directory owner=postgres tags: - config @@ -147,6 +147,6 @@ register: history_file - name: Install pghistory file - file: path="{{ copr_fe_homedir }}/.psql_history" state=touch + ansible.builtin.file: path="{{ copr_fe_homedir }}/.psql_history" state=touch owner=copr-fe group=copr-fe mode=0600 when: not history_file.stat.exists diff --git a/roles/copr/hypervisor/tasks/main.yml b/roles/copr/hypervisor/tasks/main.yml index 76f4282bc9..ce092368f4 100644 --- a/roles/copr/hypervisor/tasks/main.yml +++ b/roles/copr/hypervisor/tasks/main.yml @@ -57,7 +57,7 @@ tags: libvirtd - name: Create libvirt image directory - file: path={{ image_pool_dir }} + ansible.builtin.file: path={{ image_pool_dir }} owner=qemu group=qemu mode=ug=rwx,g+s state=directory tags: libvirtd diff --git a/roles/copr/keygen/tasks/main.yml b/roles/copr/keygen/tasks/main.yml index fb04d417e3..abb571315b 100644 --- a/roles/copr/keygen/tasks/main.yml +++ b/roles/copr/keygen/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Prepare mount point - file: state=directory path=/var/lib/copr-keygen + ansible.builtin.file: state=directory path=/var/lib/copr-keygen - name: Mount up disk of copr repo mount: name=/var/lib/copr-keygen src='LABEL=copr-keygen' fstype=ext4 state=mounted @@ -12,8 +12,7 @@ - restart haveged - name: Change owner of data to copr-signer - file: path=/var/lib/copr-keygen owner=copr-signer group=copr-signer recurse=yes - when: keychain_mounted.changed + ansible.builtin.file: path=/var/lib/copr-keygen owner=copr-signer group=copr-signer recurse=yes - name: Put keygen vhost for httpd copy: src="httpd/copr-keygen.conf" dest="/etc/httpd/conf.d/copr-keygen.conf" @@ -46,7 +45,7 @@ # Three tasks for handling our custom selinux module - name: Ensure a directory exists for our custom selinux module - file: dest=/usr/local/share/copr state=directory + ansible.builtin.file: dest=/usr/local/share/copr state=directory - name: Copy over our custom selinux module copy: src=selinux/copr_rules.pp dest=/usr/local/share/copr/copr_rules.pp diff --git a/roles/copr/keygen/tasks/setup_backup.yml b/roles/copr/keygen/tasks/setup_backup.yml index 1fde699551..b13fa283f2 100644 --- a/roles/copr/keygen/tasks/setup_backup.yml +++ b/roles/copr/keygen/tasks/setup_backup.yml @@ -1,6 +1,6 @@ --- - name: Ensure /backup dir - file: path=/backup state=directory + ansible.builtin.file: path=/backup state=directory - name: Copy pubkey for backup encryption copy: src="{{ private }}/files/copr/keygen/backup_key.asc" dest="/root/backup_key.asc" diff --git a/roles/developer/build/tasks/main.yml b/roles/developer/build/tasks/main.yml index 38deb37e9a..cfd35d1e64 100644 --- a/roles/developer/build/tasks/main.yml +++ b/roles/developer/build/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Create directories - file: state=directory + ansible.builtin.file: state=directory path=/srv/web/{{item}} owner=apache group=apache mode=0755 setype=httpd_sys_content_t seuser=system_u diff --git a/roles/distgit/pagure/tasks/main.yml b/roles/distgit/pagure/tasks/main.yml index cdd9d076e1..aff87d5a09 100644 --- a/roles/distgit/pagure/tasks/main.yml +++ b/roles/distgit/pagure/tasks/main.yml @@ -49,7 +49,7 @@ # - stunnel # - name: Ensure old stunnel init file is gone -# file: dest=/etc/init.d/stunnel/stunnel.init state=absent +# ansible.builtin.file: dest=/etc/init.d/stunnel/stunnel.init state=absent # tags: # - pagure # - stunnel @@ -93,7 +93,7 @@ - pagure - name: Create the /var/log/pagure folder where to store the logs - file: state=directory + ansible.builtin.file: state=directory path=/var/log/pagure owner=pagure group=packager mode=u+rwx,g+rwxs,o+rx tags: @@ -113,7 +113,7 @@ - fix_log - name: Create the /srv/tmp folder where to clone repos - file: state=directory + ansible.builtin.file: state=directory path=/srv/tmp owner=pagure group=pagure mode=0775 tags: @@ -163,7 +163,7 @@ - pagure - name: Create all the directories where we store the git repos - file: state=directory + ansible.builtin.file: state=directory path={{ item }} owner=root group=packager mode=2775 with_items: @@ -176,7 +176,7 @@ - pagure - name: Create the remotes folder so pagure can clone remote repos - file: state=directory + ansible.builtin.file: state=directory path={{ item }} owner=root group=packager mode=2775 with_items: @@ -271,7 +271,7 @@ - restart apache - name: Create the /srv/cache/extras folder for the crons - file: state=directory + ansible.builtin.file: state=directory path=/srv/cache/extras owner=apache group=apache mode=0775 tags: @@ -321,7 +321,7 @@ - fedora-messaging - name: Create the config folder for fedora-messaging - file: path=/etc/fedora-messaging/ owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/fedora-messaging/ owner=root group=root mode=0755 state=directory tags: - pagure - fedora-messaging @@ -335,7 +335,7 @@ - fedora-messaging - name: Create folder where we'll place the certs - file: path=/etc/pki/rabbitmq/pagurecert/ owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/pki/rabbitmq/pagurecert/ owner=root group=root mode=0755 state=directory tags: - pagure - fedora-messaging diff --git a/roles/distgit/tasks/main.yml b/roles/distgit/tasks/main.yml index e757bcd545..e98f2addff 100644 --- a/roles/distgit/tasks/main.yml +++ b/roles/distgit/tasks/main.yml @@ -42,7 +42,7 @@ - distgit - name: Create suexec wrapper directory - file: path=/var/www/bin state=directory owner=pagure group=packager + ansible.builtin.file: path=/var/www/bin state=directory owner=pagure group=packager tags: - distgit @@ -168,13 +168,13 @@ when: inventory_hostname.startswith('batcave') - name: Create the distgit root directory (/srv/git) - file: dest=/srv/git state=directory mode=0755 + ansible.builtin.file: dest=/srv/git state=directory mode=0755 tags: - distgit # These should all map to pkgdb namespaces - name: Create our namespace directories inside there.. - file: dest=/srv/git/repositories/{{item}} state=directory mode=2775 group=packager + ansible.builtin.file: dest=/srv/git/repositories/{{item}} state=directory mode=2775 group=packager with_items: - rpms - docker @@ -247,7 +247,7 @@ - sslciphers - name: Create the Lookaside Cache root directory - file: dest=/srv/cache/lookaside/pkgs state=directory + ansible.builtin.file: dest=/srv/cache/lookaside/pkgs state=directory owner=apache group=apache tags: - distgit @@ -310,7 +310,7 @@ # Three tasks for handling our selinux policy for upload.cgi - name: Ensure a directory exists for our SELinux policy - file: dest=/usr/local/share/selinux/ state=directory + ansible.builtin.file: dest=/usr/local/share/selinux/ state=directory tags: selinux - name: Copy over our custom selinux policy @@ -349,7 +349,7 @@ - pkgs - name: Make dir for grokmirror manifest - file: path=/srv/git/grokmirror state=directory owner=root group=packager mode=2775 + ansible.builtin.file: path=/srv/git/grokmirror state=directory owner=root group=packager mode=2775 tags: - grokmirror - pkgs diff --git a/roles/docker-distribution/tasks/main.yml b/roles/docker-distribution/tasks/main.yml index d5a8c649fd..f9dad93b99 100644 --- a/roles/docker-distribution/tasks/main.yml +++ b/roles/docker-distribution/tasks/main.yml @@ -20,7 +20,7 @@ - docker-distribution - name: Ensure docker certs dir exists - file: + ansible.builtin.file: path: "{{ cert.dest_dir }}" state: directory when: tls.enabled diff --git a/roles/download/tasks/main.yml b/roles/download/tasks/main.yml index 62196b3b24..fbf46b94d9 100644 --- a/roles/download/tasks/main.yml +++ b/roles/download/tasks/main.yml @@ -9,10 +9,10 @@ - packages - name: Create /srv/pub directory - file: path=/srv/pub state=directory + ansible.builtin.file: path=/srv/pub state=directory - name: Create /srv/web directory - file: path=/srv/web state=directory + ansible.builtin.file: path=/srv/web state=directory - name: Set httpd_use_nfs seboolean seboolean: name=httpd_use_nfs state=yes persistent=yes diff --git a/roles/easyfix/gather/tasks/main.yml b/roles/easyfix/gather/tasks/main.yml index d095153df4..9d6f9afc7a 100644 --- a/roles/easyfix/gather/tasks/main.yml +++ b/roles/easyfix/gather/tasks/main.yml @@ -3,14 +3,14 @@ ## Create all the folder used/needed - name: Create the easyfix folder - file: state=directory + ansible.builtin.file: state=directory path=/srv/web/easyfix owner=apache group=apache mode=0755 tags: - easyfix - name: Create the easyfix configuration folder - file: state=directory + ansible.builtin.file: state=directory path=/etc/fedora-gather-easyfix/ owner=root group=root mode=0755 tags: diff --git a/roles/easyfix/proxy/tasks/main.yml b/roles/easyfix/proxy/tasks/main.yml index c64b023df8..bf1d7e2702 100644 --- a/roles/easyfix/proxy/tasks/main.yml +++ b/roles/easyfix/proxy/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Ensure dir for content exists - file: dest=/srv/web/gather-easyfix owner=root group=root mode=0755 state=directory + ansible.builtin.file: dest=/srv/web/gather-easyfix owner=root group=root mode=0755 state=directory tags: - easyfix - easyfix/proxy diff --git a/roles/fas2discourse/tasks/administration-tasks.yml b/roles/fas2discourse/tasks/administration-tasks.yml index 6b0411e7a2..648b373283 100644 --- a/roles/fas2discourse/tasks/administration-tasks.yml +++ b/roles/fas2discourse/tasks/administration-tasks.yml @@ -1,6 +1,6 @@ --- - name: Create the directories to hold the templates - file: + ansible.builtin.file: path: "/root/ocp4/openshift-apps/fas2discourse-operator" state: directory owner: root diff --git a/roles/fas2discourse/tasks/create-keytab.yml b/roles/fas2discourse/tasks/create-keytab.yml index ba0a44383d..640f04cbc1 100644 --- a/roles/fas2discourse/tasks/create-keytab.yml +++ b/roles/fas2discourse/tasks/create-keytab.yml @@ -1,7 +1,7 @@ --- - name: Create the fas2discourse keytab path on the batcave01 - file: + ansible.builtin.file: path: "/etc/openshift_apps/fas2discourse/" state: directory owner: root diff --git a/roles/fedmsg/base/tasks/main.yml b/roles/fedmsg/base/tasks/main.yml index e81d958dc3..f008fc0f7c 100644 --- a/roles/fedmsg/base/tasks/main.yml +++ b/roles/fedmsg/base/tasks/main.yml @@ -43,13 +43,13 @@ when: ansible_distribution_major_version|int < 31 and ansible_distribution == 'Fedora' - name: Setup /etc/fedmsg.d directory - file: path=/etc/fedmsg.d owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/fedmsg.d owner=root group=root mode=0755 state=directory tags: - config - fedmsg/base - name: Remove any old static endpoints files - file: dest="/etc/fedmsg.d/{{item}}" state=absent + ansible.builtin.file: dest="/etc/fedmsg.d/{{item}}" state=absent with_items: - endpoints-bodhi.py - endpoints-elections.py @@ -172,7 +172,7 @@ - restart fedmsg-relay - name: Destroy standard config to make way for debug loopback. - file: dest=/etc/fedmsg.d/{{item}} state=absent + ansible.builtin.file: dest=/etc/fedmsg.d/{{item}} state=absent with_items: - relay.py - policy.py @@ -208,7 +208,7 @@ - fedmsg/base - name: Setup /etc/pki/fedmsg directory - file: path=/etc/pki/fedmsg owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/pki/fedmsg owner=root group=root mode=0755 state=directory tags: - config - fedmsg/base @@ -254,7 +254,7 @@ # Three tasks for handling our custom selinux module - name: Ensure a directory exists for our custom selinux module - file: dest=/usr/local/share/fedmsg state=directory + ansible.builtin.file: dest=/usr/local/share/fedmsg state=directory tags: - fedmsg/base diff --git a/roles/fedmsg/crl/tasks/main.yml b/roles/fedmsg/crl/tasks/main.yml index 6194ea6881..45f5634115 100644 --- a/roles/fedmsg/crl/tasks/main.yml +++ b/roles/fedmsg/crl/tasks/main.yml @@ -5,7 +5,7 @@ --- - name: Ensure dir for content exists - file: dest=/srv/web/fedmsg owner=apache group=apache mode=0755 state=directory + ansible.builtin.file: dest=/srv/web/fedmsg owner=apache group=apache mode=0755 state=directory tags: - fedmsg - fedmsg/crl diff --git a/roles/fedmsg/gateway/slave/tasks/main.yml b/roles/fedmsg/gateway/slave/tasks/main.yml index c048cf5cea..72590ffb05 100644 --- a/roles/fedmsg/gateway/slave/tasks/main.yml +++ b/roles/fedmsg/gateway/slave/tasks/main.yml @@ -61,7 +61,7 @@ # Stunnel specific bits - name: Create directories - file: path=/etc/{{ item }} state=directory + ansible.builtin.file: path=/etc/{{ item }} state=directory with_items: - stunnel tags: @@ -80,7 +80,7 @@ - fedmsg/gateway/slave - name: Ensure old stunnel init file is gone - file: dest=/etc/init.d/stunnel/stunnel.init state=absent + ansible.builtin.file: dest=/etc/init.d/stunnel/stunnel.init state=absent tags: - fedmsg/gateway - fedmsg/gateway/slave diff --git a/roles/fedmsg/gateway/tasks/main.yml b/roles/fedmsg/gateway/tasks/main.yml index 44bf525a91..241a30ace9 100644 --- a/roles/fedmsg/gateway/tasks/main.yml +++ b/roles/fedmsg/gateway/tasks/main.yml @@ -6,7 +6,7 @@ - fedmsg/gateway - name: Ensure that nrpe has rights to monitor us - file: > + ansible.builtin.file: > dest=/var/run/fedmsg/monitoring-fedmsg-gateway.socket mode=0775 owner=fedmsg @@ -25,7 +25,7 @@ - restart fedmsg-gateway - name: Create systemd drop-in directory - file: > + ansible.builtin.file: > dest=/etc/systemd/system/fedmsg-gateway.service.d state=directory tags: diff --git a/roles/fedmsg/hub/tasks/main.yml b/roles/fedmsg/hub/tasks/main.yml index f3ec0772a5..84f51901af 100644 --- a/roles/fedmsg/hub/tasks/main.yml +++ b/roles/fedmsg/hub/tasks/main.yml @@ -35,12 +35,12 @@ notify: restart fedmsg-hub - name: Disable the websocket server if we should.. - file: dest=/etc/fedmsg.d/websockets.py state=absent + ansible.builtin.file: dest=/etc/fedmsg.d/websockets.py state=absent when: not enable_websocket_server notify: restart fedmsg-hub - name: Set fedmsg ownership on /var/run/fedmsg - file: > + ansible.builtin.file: > dest=/var/run/fedmsg/ mode=2775 owner=fedmsg @@ -50,7 +50,7 @@ - fedmsgmonitor - name: Ensure that nrpe has rights to monitor us - file: > + ansible.builtin.file: > dest=/var/run/fedmsg/monitoring-fedmsg-hub.socket mode=0775 owner=fedmsg @@ -63,7 +63,7 @@ - fedmsgmonitor - name: Create systemd config directoryies - file: path="/etc/systemd/system/{{ item }}.service.d" state=directory + ansible.builtin.file: path="/etc/systemd/system/{{ item }}.service.d" state=directory with_items: - fedmsg-hub - fedmsg-hub-3 diff --git a/roles/fedmsg/irc/tasks/main.yml b/roles/fedmsg/irc/tasks/main.yml index f3634a567c..9747128553 100644 --- a/roles/fedmsg/irc/tasks/main.yml +++ b/roles/fedmsg/irc/tasks/main.yml @@ -11,7 +11,7 @@ - fedmsg/irc - name: Ensure that nrpe has rights to monitor us - file: > + ansible.builtin.file: > dest=/var/run/fedmsg/monitoring-fedmsg-irc.socket mode=0775 owner=fedmsg diff --git a/roles/fedmsg/relay/tasks/main.yml b/roles/fedmsg/relay/tasks/main.yml index ad849728a5..8ce967cfdd 100644 --- a/roles/fedmsg/relay/tasks/main.yml +++ b/roles/fedmsg/relay/tasks/main.yml @@ -17,7 +17,7 @@ when: ansible_distribution_major_version|int > 21 - name: Ensure that nrpe has rights to monitor us - file: > + ansible.builtin.file: > dest=/var/run/fedmsg/monitoring-fedmsg-relay.socket mode=0775 owner=fedmsg diff --git a/roles/fedora-budget/build/tasks/main.yml b/roles/fedora-budget/build/tasks/main.yml index 55bf06de4e..b360cf600e 100644 --- a/roles/fedora-budget/build/tasks/main.yml +++ b/roles/fedora-budget/build/tasks/main.yml @@ -1,5 +1,5 @@ --- -- file: dest=/srv/web/budget.fedoraproject.org state=directory +- ansible.builtin.file: dest=/srv/web/budget.fedoraproject.org state=directory - template: > src=budget-sync.j2 dest=/usr/local/bin/budget-sync diff --git a/roles/fedora-web/build/tasks/main.yml b/roles/fedora-web/build/tasks/main.yml index 7f3a70b678..e75b2c13ca 100644 --- a/roles/fedora-web/build/tasks/main.yml +++ b/roles/fedora-web/build/tasks/main.yml @@ -57,7 +57,7 @@ - fedora-web - name: Create directories - file: + ansible.builtin.file: state: directory path: /srv/web/{{ item }} owner: apache @@ -75,7 +75,7 @@ - fedora-web - name: Make fmw dir - file: + ansible.builtin.file: state: directory path: /srv/web/fmw owner: apache @@ -88,7 +88,7 @@ when: env != 'staging' - name: Make fmw dir - file: + ansible.builtin.file: state: directory path: /srv/web/fmw owner: apache @@ -101,14 +101,14 @@ when: env == 'staging' - name: Remove the syncTranslations cronjob - file: + ansible.builtin.file: path: /etc/cron.d/syncTranslations.cron state: absent tags: - cron - name: Remove the syncStatic cronjob - file: + ansible.builtin.file: path: /etc/cron.d/syncStatic.cron state: absent tags: diff --git a/roles/fedora-web/fedora.im/tasks/main.yml b/roles/fedora-web/fedora.im/tasks/main.yml index 2cd4a89449..a6af6ad546 100644 --- a/roles/fedora-web/fedora.im/tasks/main.yml +++ b/roles/fedora-web/fedora.im/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Make /srv/web/fedora.im dir - file: state=directory + ansible.builtin.file: state=directory path=/srv/web/fedora.im owner=apache group=apache diff --git a/roles/fedora-web/main/tasks/main.yml b/roles/fedora-web/main/tasks/main.yml index 82b8cf2ba1..7ebf9638f7 100644 --- a/roles/fedora-web/main/tasks/main.yml +++ b/roles/fedora-web/main/tasks/main.yml @@ -10,7 +10,7 @@ - name: Load s3 credentials ansible.builtin.include_vars: - file: "{{ private }}/files/websites/s3_fedoraproject_{{ env_short }}.yml" + ansible.builtin.file: "{{ private }}/files/websites/s3_fedoraproject_{{ env_short }}.yml" ignore_errors: true tags: - fedora-web @@ -38,7 +38,7 @@ - fedoraproject_s3_bucket_name is defined - name: Make directory for the config files for {{website}} we are about to copy - file: path=/etc/httpd/conf.d/{{website}} state=directory owner=root group=root mode=0755 + ansible.builtin.file: path=/etc/httpd/conf.d/{{website}} state=directory owner=root group=root mode=0755 tags: - fedora-web - fedora-web/main @@ -80,7 +80,7 @@ - fedora-web/main - name: Create a directory for hotspot - file: path=/srv/web state=directory owner=root group=root mode=0755 + ansible.builtin.file: path=/srv/web state=directory owner=root group=root mode=0755 tags: - fedora-web - fedora-web/main diff --git a/roles/fedora-web/ostree/tasks/main.yml b/roles/fedora-web/ostree/tasks/main.yml index 55220427d1..130fd0a1d2 100644 --- a/roles/fedora-web/ostree/tasks/main.yml +++ b/roles/fedora-web/ostree/tasks/main.yml @@ -8,7 +8,7 @@ - ostree - name: Make ostree dir - file: state=directory + ansible.builtin.file: state=directory path=/srv/web/ostree owner=apache group=sysadmin-releng @@ -21,7 +21,7 @@ when: env != 'staging' - name: Make ostree dir - file: state=directory + ansible.builtin.file: state=directory path=/srv/web/ostree owner=apache group=apache @@ -43,7 +43,7 @@ - ostree - name: Make IoT ostree dir - file: state=directory + ansible.builtin.file: state=directory path=/srv/web/ostree/iot owner=apache group=sysadmin-releng @@ -56,7 +56,7 @@ when: env != 'staging' - name: Make IoT ostree dir - file: state=directory + ansible.builtin.file: state=directory path=/srv/web/ostree/iot owner=apache group=apache diff --git a/roles/fedora-web/registry/tasks/main.yml b/roles/fedora-web/registry/tasks/main.yml index 35fc02e435..aca9ad7e95 100644 --- a/roles/fedora-web/registry/tasks/main.yml +++ b/roles/fedora-web/registry/tasks/main.yml @@ -1,11 +1,11 @@ --- - name: Make registry-signatures dir - file: state=directory path=/srv/web/registry-signatures owner=apache group=sysadmin-releng mode=2775 setype=httpd_sys_content_t seuser=system_u + ansible.builtin.file: state=directory path=/srv/web/registry-signatures owner=apache group=sysadmin-releng mode=2775 setype=httpd_sys_content_t seuser=system_u tags: - fedora-web - name: Make registry-index dir - file: state=directory path=/srv/web/registry-index owner=apache group=apache mode=755 setype=httpd_sys_content_t seuser=system_u + ansible.builtin.file: state=directory path=/srv/web/registry-index owner=apache group=apache mode=755 setype=httpd_sys_content_t seuser=system_u tags: - fedora-web diff --git a/roles/fedora_nightlies/tasks/main.yml b/roles/fedora_nightlies/tasks/main.yml index 10fce4b9bd..40945782db 100644 --- a/roles/fedora_nightlies/tasks/main.yml +++ b/roles/fedora_nightlies/tasks/main.yml @@ -104,7 +104,7 @@ - restart fedora_nightlies - name: Create /etc/pki/fedora-messaging - file: + ansible.builtin.file: dest: /etc/pki/fedora-messaging mode: "0775" owner: root diff --git a/roles/fedoraloveskde/build/tasks/main.yml b/roles/fedoraloveskde/build/tasks/main.yml index ddef86bd6d..4d60a9eba5 100644 --- a/roles/fedoraloveskde/build/tasks/main.yml +++ b/roles/fedoraloveskde/build/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Create directories - file: + ansible.builtin.file: state: directory path: "/srv/web/{{item}}" owner: apache diff --git a/roles/flatpak-cache/tasks/main.yml b/roles/flatpak-cache/tasks/main.yml index e3415f7409..cb2268f441 100644 --- a/roles/flatpak-cache/tasks/main.yml +++ b/roles/flatpak-cache/tasks/main.yml @@ -11,7 +11,7 @@ - config - name: Ensure /var/spool/squid directory exists - file: + ansible.builtin.file: path: /var/spool/squid state: directory owner: squid @@ -22,7 +22,7 @@ - config - name: Ensure /etc/pki/squid directory exists - file: + ansible.builtin.file: path: /etc/pki/squid state: directory owner: squid diff --git a/roles/freemedia/tasks/main.yml b/roles/freemedia/tasks/main.yml index 7449af628a..7716c8c4da 100644 --- a/roles/freemedia/tasks/main.yml +++ b/roles/freemedia/tasks/main.yml @@ -12,7 +12,7 @@ - packages - name: Setup /srv/web/freemedia directory - file: path=/srv/web/freemedia owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/srv/web/freemedia owner=root group=root mode=0755 state=directory tags: - config diff --git a/roles/geoip-city-wsgi/app/tasks/main.yml b/roles/geoip-city-wsgi/app/tasks/main.yml index 4966f18624..fa269bcc3c 100644 --- a/roles/geoip-city-wsgi/app/tasks/main.yml +++ b/roles/geoip-city-wsgi/app/tasks/main.yml @@ -41,7 +41,7 @@ - geoip-city-wsgi/app - name: Setup /usr/share/geoip-city-wsgi directory - file: > + ansible.builtin.file: > path=/usr/share/geoip-city-wsgi owner=root group=root diff --git a/roles/geoip-city-wsgi/proxy/tasks/main.yml b/roles/geoip-city-wsgi/proxy/tasks/main.yml index 709e9b693d..e8e0bf550f 100644 --- a/roles/geoip-city-wsgi/proxy/tasks/main.yml +++ b/roles/geoip-city-wsgi/proxy/tasks/main.yml @@ -11,7 +11,7 @@ - geoip-city-wsgi/proxy - name: Make a dir for our fancy about page. So chic! - file: dest=/srv/web/geoip state=directory mode=0775 owner=root group=root + ansible.builtin.file: dest=/srv/web/geoip state=directory mode=0775 owner=root group=root tags: - geoip-city-wsgi - geoip-city-wsgi/proxy diff --git a/roles/geoip/tasks/main.yml b/roles/geoip/tasks/main.yml index f5c72da854..3b04cf0f07 100644 --- a/roles/geoip/tasks/main.yml +++ b/roles/geoip/tasks/main.yml @@ -13,7 +13,7 @@ when: (ansible_distribution == 'RedHat' and ansible_distribution_major_version|int >= 8) - name: Make sure the /usr/share/GeoIP/ directory exists - file: + ansible.builtin.file: path: /usr/share/GeoIP/ state: directory owner: root diff --git a/roles/git/make_checkout_seed/tasks/main.yml b/roles/git/make_checkout_seed/tasks/main.yml index 87c82f7274..8a5a342ff4 100644 --- a/roles/git/make_checkout_seed/tasks/main.yml +++ b/roles/git/make_checkout_seed/tasks/main.yml @@ -8,7 +8,7 @@ - python2 - name: Create the destination directory - file: dest=/srv/git_seed owner=root group=root mode=0755 state=directory + ansible.builtin.file: dest=/srv/git_seed owner=root group=root mode=0755 state=directory when: env != 'staging' - name: Install the production version of the script and schedule its execution diff --git a/roles/git/server/tasks/main.yml b/roles/git/server/tasks/main.yml index 95a37701da..6a4c7e8ae7 100644 --- a/roles/git/server/tasks/main.yml +++ b/roles/git/server/tasks/main.yml @@ -7,12 +7,12 @@ # If NOT using xinetd - name: Delete stock git daemon config - file: path="/usr/lib/systemd/system/git.service" state=absent + ansible.builtin.file: path="/usr/lib/systemd/system/git.service" state=absent when: ansible_distribution_major_version|int >= 7 and ansible_distribution == 'RedHat' tags: git/server - name: Delete stock git daemon config - file: path="/usr/lib/systemd/system/git.service" state=absent + ansible.builtin.file: path="/usr/lib/systemd/system/git.service" state=absent when: ansible_distribution_major_version|int >= 29 and ansible_distribution == 'Fedora' tags: git/server diff --git a/roles/github2fedmsg/tasks/main.yml b/roles/github2fedmsg/tasks/main.yml index fd99685366..e484d7ff53 100644 --- a/roles/github2fedmsg/tasks/main.yml +++ b/roles/github2fedmsg/tasks/main.yml @@ -13,7 +13,7 @@ - github2fedmsg - name: Make some directories - file: dest="{{item}}" mode=0755 state=directory + ansible.builtin.file: dest="{{item}}" mode=0755 state=directory with_items: - /etc/github2fedmsg - /usr/share/github2fedmsg diff --git a/roles/gitolite/base/tasks/main.yml b/roles/gitolite/base/tasks/main.yml index fac27da3be..a07bade624 100644 --- a/roles/gitolite/base/tasks/main.yml +++ b/roles/gitolite/base/tasks/main.yml @@ -8,4 +8,4 @@ - perl-Sys-Syslog - name: Ensure the /etc/gitolite directory - file: path=/etc/gitolite owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/gitolite owner=root group=root mode=0755 state=directory diff --git a/roles/grobisplitter/tasks/main.yml b/roles/grobisplitter/tasks/main.yml index 41fa9cccdc..5a625f1b45 100644 --- a/roles/grobisplitter/tasks/main.yml +++ b/roles/grobisplitter/tasks/main.yml @@ -11,7 +11,7 @@ - grobi - name: Make sure that /usr/local/bin exists - file: path=/usr/local/bin state=directory + ansible.builtin.file: path=/usr/local/bin state=directory tags: - grobi diff --git a/roles/grokmirror_mirror/tasks/main.yml b/roles/grokmirror_mirror/tasks/main.yml index 1f723c639f..970bece6a5 100644 --- a/roles/grokmirror_mirror/tasks/main.yml +++ b/roles/grokmirror_mirror/tasks/main.yml @@ -12,12 +12,12 @@ user: name=grokmirror local=true - name: Create directory to mirror repos to - file: dest={{grokmirror_topdir}} mode=0755 state=directory owner=grokmirror + ansible.builtin.file: dest={{grokmirror_topdir}} mode=0755 state=directory owner=grokmirror tags: - grokmirror-mirror - name: Create directory to mirror site to - file: dest={{grokmirror_topdir}}/src.fedoraproject.org mode=0755 state=directory owner=grokmirror + ansible.builtin.file: dest={{grokmirror_topdir}}/src.fedoraproject.org mode=0755 state=directory owner=grokmirror tags: - grokmirror-mirror diff --git a/roles/haproxy/rewrite/tasks/main.yml b/roles/haproxy/rewrite/tasks/main.yml index 7f2fa7f11f..42a78f2390 100644 --- a/roles/haproxy/rewrite/tasks/main.yml +++ b/roles/haproxy/rewrite/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Make directory for the config files for {{website}} we are about to copy - file: path=/etc/httpd/conf.d/{{website}} state=directory owner=root group=root mode=0755 + ansible.builtin.file: path=/etc/httpd/conf.d/{{website}} state=directory owner=root group=root mode=0755 tags: - haproxy - haproxy/rewrite diff --git a/roles/haproxy/tasks/main.yml b/roles/haproxy/tasks/main.yml index d576ef9fa5..70cc68415f 100644 --- a/roles/haproxy/tasks/main.yml +++ b/roles/haproxy/tasks/main.yml @@ -79,7 +79,7 @@ # These following four tasks are used for copying over our custom selinux # module. - name: Ensure a directory exists for our custom selinux module - file: dest=/usr/share/haproxy state=directory + ansible.builtin.file: dest=/usr/share/haproxy state=directory tags: - haproxy - selinux diff --git a/roles/httpd/proxy/tasks/main.yml b/roles/httpd/proxy/tasks/main.yml index 1904ad49e8..f70489cabf 100644 --- a/roles/httpd/proxy/tasks/main.yml +++ b/roles/httpd/proxy/tasks/main.yml @@ -16,7 +16,7 @@ - httpd/proxy - name: Make sure certain files are gone - file: dest=/etc/httpd/conf.d/{{item}} state=absent + ansible.builtin.file: dest=/etc/httpd/conf.d/{{item}} state=absent with_items: - welcome.conf tags: @@ -38,7 +38,7 @@ - httpd/proxy - name: Remove the keepalives configuration - file: path=/etc/httpd/conf.d/01-keepalives.conf state=absent + ansible.builtin.file: path=/etc/httpd/conf.d/01-keepalives.conf state=absent notify: - reload proxyhttpd tags: @@ -86,7 +86,7 @@ - selinux - name: Create pki/httpd - file: path=/etc/pki/httpd state=directory + ansible.builtin.file: path=/etc/pki/httpd state=directory owner=root group=root mode=0600 tags: - httpd @@ -100,7 +100,7 @@ - disablesystemdoomd - name: Create systemd drop in dir for httpd - file: path=/etc/systemd/system/httpd.service.d/ state=directory + ansible.builtin.file: path=/etc/systemd/system/httpd.service.d/ state=directory tags: - httpd - httpd/proxy diff --git a/roles/httpd/redirectmatch/tasks/main.yml b/roles/httpd/redirectmatch/tasks/main.yml index 0c76e917b0..f7d11daf32 100644 --- a/roles/httpd/redirectmatch/tasks/main.yml +++ b/roles/httpd/redirectmatch/tasks/main.yml @@ -9,7 +9,7 @@ --- - name: Ensure directory exists for redirect - file: + ansible.builtin.file: path: /etc/httpd/conf.d/{{website}} state: directory mode: '0755' diff --git a/roles/httpd/website/tasks/main.yml b/roles/httpd/website/tasks/main.yml index 7e62c771bf..9b8ecd8ea3 100644 --- a/roles/httpd/website/tasks/main.yml +++ b/roles/httpd/website/tasks/main.yml @@ -10,7 +10,7 @@ --- - name: Create site directory in httpd/conf.d/{{site_name}} - file: > + ansible.builtin.file: > dest=/etc/httpd/conf.d/{{site_name}} state=directory owner=root @@ -63,7 +63,7 @@ - robots - name: Create /srv/web - file: > + ansible.builtin.file: > dest=/srv/web state=directory owner=root diff --git a/roles/ipa/client/tasks/main.yml b/roles/ipa/client/tasks/main.yml index 4feae3a3c4..16df38bf19 100644 --- a/roles/ipa/client/tasks/main.yml +++ b/roles/ipa/client/tasks/main.yml @@ -34,7 +34,7 @@ - config - name: Remove ipa sshd config since we do not need it - file: + ansible.builtin.file: state: absent path: /etc/ssh/sshd_config.d/04-ipa.conf tags: diff --git a/roles/ipsilon/tasks/main.yml b/roles/ipsilon/tasks/main.yml index 72e612c1ee..6604f0f8a3 100644 --- a/roles/ipsilon/tasks/main.yml +++ b/roles/ipsilon/tasks/main.yml @@ -95,7 +95,7 @@ - patches - name: Make sure /etc/ipsilon/root is owned correctly - file: + ansible.builtin.file: path: "/etc/ipsilon/root" owner: ipsilon group: ipsilon @@ -166,7 +166,7 @@ - ipsilon - name: Create SAML2 dir - file: + ansible.builtin.file: path: /etc/ipsilon/root/saml2 state: directory mode: "0700" @@ -251,7 +251,7 @@ - ipsilon - name: Apply selinux type to the wsgi file - file: + ansible.builtin.file: dest: /usr/libexec/ipsilon setype: httpd_sys_content_t tags: diff --git a/roles/ipsilon/tasks/patches.yml b/roles/ipsilon/tasks/patches.yml index 621946658d..273d6c7a36 100644 --- a/roles/ipsilon/tasks/patches.yml +++ b/roles/ipsilon/tasks/patches.yml @@ -6,7 +6,7 @@ - patchutils - name: Prepare the patches directory - file: + ansible.builtin.file: path: /opt/ipsilon-patches state: directory diff --git a/roles/kerneltest/tasks/main.yml b/roles/kerneltest/tasks/main.yml index 8c823571a8..34afcb1b15 100644 --- a/roles/kerneltest/tasks/main.yml +++ b/roles/kerneltest/tasks/main.yml @@ -15,7 +15,7 @@ - kerneltest - name: Create the folder to store the logs - file: state=directory + ansible.builtin.file: state=directory path=/var/www/logs owner=apache group=apache mode=0755 tags: @@ -56,7 +56,7 @@ - selinux - name: Apply selinux type to log files - file: > + ansible.builtin.file: > dest=/var/www/logs setype=httpd_sys_rw_content_t state=directory diff --git a/roles/keytab/service/tasks/main.yml b/roles/keytab/service/tasks/main.yml index 7b729e8f76..9f899e91f8 100644 --- a/roles/keytab/service/tasks/main.yml +++ b/roles/keytab/service/tasks/main.yml @@ -108,7 +108,7 @@ - name: Destroy stored keytab delegate_to: "{{ ipa_server }}" - file: path=/tmp/{{service}}_{{host}}.kt state=absent + ansible.builtin.file: path=/tmp/{{service}}_{{host}}.kt state=absent tags: - keytab - config @@ -134,14 +134,14 @@ when: not keytab_status.stat.exists - name: Destroy encoded keytab - file: path={{kt_location}}.b64 state=absent + ansible.builtin.file: path={{kt_location}}.b64 state=absent tags: - keytab - config - krb5 - name: Set keytab permissions - file: path={{kt_location}} owner={{owner_user}} group={{owner_group}} mode=0640 state=file + ansible.builtin.file: path={{kt_location}} owner={{owner_user}} group={{owner_group}} mode=0640 state=file tags: - keytab - config diff --git a/roles/koji_builder/tasks/main.yml b/roles/koji_builder/tasks/main.yml index 2b9ffb0280..a60720f85d 100644 --- a/roles/koji_builder/tasks/main.yml +++ b/roles/koji_builder/tasks/main.yml @@ -19,12 +19,12 @@ - koji_builder - name: Make mock homedir perms - file: state=directory path=/var/lib/mock mode=2775 owner=root group=mock + ansible.builtin.file: state=directory path=/var/lib/mock mode=2775 owner=root group=mock tags: - koji_builder - name: Add mock ssh dir - file: state=directory path=/var/lib/mock/.ssh mode=700 owner=mock group=mock + ansible.builtin.file: state=directory path=/var/lib/mock/.ssh mode=700 owner=mock group=mock tags: - koji_builder @@ -44,7 +44,7 @@ - koji_builder - name: Mockbuilder .ssh dir - file: state=directory path=/home/mockbuilder/.ssh mode=700 owner=mockbuilder group=mockbuilder + ansible.builtin.file: state=directory path=/home/mockbuilder/.ssh mode=700 owner=mockbuilder group=mockbuilder tags: - koji_builder @@ -54,7 +54,7 @@ - koji_builder - name: Make a bunch of dirs - file: state=directory path={{ item }} + ansible.builtin.file: state=directory path={{ item }} with_items: - /pub - /mnt/fedora_koji @@ -115,7 +115,7 @@ - rpmautospec - name: Remove obsolete configuration of rpmautospec - file: + ansible.builtin.file: path: "/etc/kojid/plugins/{{ item }}" state: absent loop: @@ -161,7 +161,7 @@ - rpmautospec - name: Create osbuild builder config directory - file: path=/etc/koji-osbuild state=directory mode=0755 + ansible.builtin.file: path=/etc/koji-osbuild state=directory mode=0755 tags: - koji_builder - koji_builder_osbuild @@ -197,12 +197,12 @@ # setup for oz/imagefactory - name: Make .psphere dir - file: state=directory path=/root/.psphere mode=775 owner=root group=root + ansible.builtin.file: state=directory path=/root/.psphere mode=775 owner=root group=root tags: - koji_builder - name: Make .psphere/templates dir - file: state=directory path=/root/.psphere/templates mode=775 owner=root group=root + ansible.builtin.file: state=directory path=/root/.psphere/templates mode=775 owner=root group=root tags: - koji_builder @@ -256,13 +256,13 @@ # - name: Make a mnt/koji link - file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji + ansible.builtin.file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji when: koji_hub_nfs is defined and koji_hub_nfs == "fedora_koji" and createrepo == True tags: - koji_builder - name: Make a mnt/koji link - file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji force=yes + ansible.builtin.file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji force=yes when: inventory_hostname.startswith(('buildvm-s390x-11', 'buildvm-s390x-12', 'buildvm-s390x-13')) tags: - koji_builder @@ -272,7 +272,7 @@ # - name: Make a mnt/koji link - file: state=link src=/mnt/fedora_koji dest=/mnt/koji + ansible.builtin.file: state=link src=/mnt/fedora_koji dest=/mnt/koji when: koji_hub_nfs is defined and koji_hub_nfs != "fedora_koji" and createrepo == True tags: - koji_builder @@ -332,7 +332,7 @@ - selinux - name: Create directory for shared secrets - file: + ansible.builtin.file: path: /etc/kojid/secrets state: directory owner: root @@ -394,7 +394,7 @@ - koji_builder/osbuildapi - name: Create override dir for systemd-nspawn containers config - file: + ansible.builtin.file: state: directory owner: root group: root diff --git a/roles/koji_hub/tasks/main.yml b/roles/koji_hub/tasks/main.yml index 7116d364dd..79fb8d7934 100644 --- a/roles/koji_hub/tasks/main.yml +++ b/roles/koji_hub/tasks/main.yml @@ -35,10 +35,10 @@ - koji_hub_osbuild - name: Make koji pki directory - file: state=directory path=/etc/pki/koji/ owner=root group=root + ansible.builtin.file: state=directory path=/etc/pki/koji/ owner=root group=root - name: Make koji pki subdirectories - file: state=directory path=/etc/pki/koji/{{ item }} owner=root group=root + ansible.builtin.file: state=directory path=/etc/pki/koji/{{ item }} owner=root group=root with_items: - certs - private @@ -104,7 +104,7 @@ when: ansible_distribution == "Fedora" - name: Create the config folder for fedora-messaging - file: path=/etc/fedora-messaging/ owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/fedora-messaging/ owner=root group=root mode=0755 state=directory tags: - koji_hub - fedora-messaging @@ -119,7 +119,7 @@ - fedora-messaging - name: Create folder where we'll place the certs - file: path=/etc/pki/rabbitmq/kojicert/ owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/pki/rabbitmq/kojicert/ owner=root group=root mode=0755 state=directory tags: - config - koji_hub @@ -183,7 +183,7 @@ - rpmautospec - name: Remove obsolete configuration for rpmautospec - file: + ansible.builtin.file: path: "/etc/koji-hub/plugins/{{ item }}" state: absent loop: @@ -306,7 +306,7 @@ notify: reload httpd - name: Kojira log dir - file: dest=/var/log/kojira owner=root group=root mode=0750 state=directory + ansible.builtin.file: dest=/var/log/kojira owner=root group=root mode=0750 state=directory tags: - config - koji_hub @@ -321,13 +321,13 @@ - restart kojira - name: Make an empty /mnt/fedora_koji for stg. - file: state=directory path=/mnt/fedora_koji/koji owner=root group=root + ansible.builtin.file: state=directory path=/mnt/fedora_koji/koji owner=root group=root tags: - koji_hub when: env == "staging" and ansible_hostname.startswith('koji') - name: Make mnt/koji directory - file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji owner=root group=root + ansible.builtin.file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji owner=root group=root tags: - koji_hub when: ansible_hostname.startswith('koji') @@ -370,7 +370,7 @@ when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 7 - name: Make httpd override directory - file: + ansible.builtin.file: state: directory path: /etc/systemd/system/httpd.service.d owner: root diff --git a/roles/kojipkgs/tasks/main.yml b/roles/kojipkgs/tasks/main.yml index bc722ce392..81178651c6 100644 --- a/roles/kojipkgs/tasks/main.yml +++ b/roles/kojipkgs/tasks/main.yml @@ -30,7 +30,7 @@ - kojipkgs - name: Make a mnt/koji link - file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji + ansible.builtin.file: state=link src=/mnt/fedora_koji/koji dest=/mnt/koji tags: - kojipkgs @@ -40,7 +40,7 @@ - kojipkgs - name: Make systemd drop-in override dir - file: name=/etc/systemd/system/varnish.service.d + ansible.builtin.file: name=/etc/systemd/system/varnish.service.d state=directory recurse=yes owner=root group=root diff --git a/roles/logging/tasks/main.yml b/roles/logging/tasks/main.yml index c131960d6f..2794e6a8cd 100644 --- a/roles/logging/tasks/main.yml +++ b/roles/logging/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Create /etc/pki/fedora-messaging - file: + ansible.builtin.file: dest: /etc/pki/fedora-messaging mode: "0775" owner: root diff --git a/roles/mariadb_server/tasks/main.yml b/roles/mariadb_server/tasks/main.yml index d4278999db..c94612ecf3 100644 --- a/roles/mariadb_server/tasks/main.yml +++ b/roles/mariadb_server/tasks/main.yml @@ -44,7 +44,7 @@ template: src=dotmy.cnf.j2 dest=/root/.my.cnf owner=root group=root mode=0700 - name: Ensure mariadb has a place to backup to - file: dest=/backups state=directory owner=mysql + ansible.builtin.file: dest=/backups state=directory owner=mysql tags: - mariadb-server diff --git a/roles/mediawiki/tasks/main.yml b/roles/mediawiki/tasks/main.yml index 74c86b4b1f..a394158e23 100644 --- a/roles/mediawiki/tasks/main.yml +++ b/roles/mediawiki/tasks/main.yml @@ -73,7 +73,7 @@ - mediawiki - name: Create /etc/pki/fedora-messaging - file: + ansible.builtin.file: dest: /etc/pki/fedora-messaging mode: "0775" owner: root @@ -144,18 +144,18 @@ - mediawiki - name: Creating wiki dir - file: path=/srv/web/{{wikiname}}-wiki owner=root group=root mode=755 state=directory + ansible.builtin.file: path=/srv/web/{{wikiname}}-wiki owner=root group=root mode=755 state=directory tags: - mediawiki # - name: Creating config dir -# file: src=/usr/share/{{ wikiver }}/config dest=/srv/web/{{wikiname}}/config owner=apache group=apache mode=755 state=directory +# ansible.builtin.file: src=/usr/share/{{ wikiver }}/config dest=/srv/web/{{wikiname}}/config owner=apache group=apache mode=755 state=directory # tags: # - mediawiki # This doesn't seem to exist anymore in upstream.... # - name: Install utils -# file: src=/usr/share/{{ wikiver }}/install-utils.inc dest=/srv/web/{{wikiname}}-wiki/install-utils.inc state=link +# ansible.builtin.file: src=/usr/share/{{ wikiver }}/install-utils.inc dest=/srv/web/{{wikiname}}-wiki/install-utils.inc state=link # tags: # - mediawiki @@ -173,62 +173,62 @@ - mediawiki - name: Linking index.php - file: dest=/srv/web/{{wikiname}}-wiki/index.php src=/usr/share/{{ wikiver }}/index.php state=link + ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/index.php src=/usr/share/{{ wikiver }}/index.php state=link tags: - mediawiki - name: Linkng api.php - file: dest=/srv/web/{{wikiname}}-wiki/api.php src=/usr/share/{{ wikiver }}/api.php state=link + ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/api.php src=/usr/share/{{ wikiver }}/api.php state=link tags: - mediawiki - name: Linking opensearch - file: dest=/srv/web/{{wikiname}}-wiki/opensearch_desc.php src=/usr/share/{{ wikiver }}/opensearch_desc.php state=link + ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/opensearch_desc.php src=/usr/share/{{ wikiver }}/opensearch_desc.php state=link tags: - mediawiki - name: Linking extensions - file: dest=/srv/web/{{wikiname}}-wiki/extensions src=/usr/share/{{ wikiver }}/extensions state=link + ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/extensions src=/usr/share/{{ wikiver }}/extensions state=link tags: - mediawiki - name: Linking includes - file: dest=/srv/web/{{wikiname}}-wiki/includes src=/usr/share/{{ wikiver }}/includes state=link + ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/includes src=/usr/share/{{ wikiver }}/includes state=link tags: - mediawiki - name: Linking languages - file: dest=/srv/web/{{wikiname}}-wiki/languages src=/usr/share/{{ wikiver }}/languages state=link + ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/languages src=/usr/share/{{ wikiver }}/languages state=link tags: - mediawiki - name: Linking maintenance - file: dest=/srv/web/{{wikiname}}-wiki/maintenance src=/usr/share/{{ wikiver }}/maintenance state=link + ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/maintenance src=/usr/share/{{ wikiver }}/maintenance state=link tags: - mediawiki # - name: Linking serialized -# file: dest=/srv/web/{{wikiname}}-wiki/serialized src=/usr/share/{{ wikiver }}/serialized state=link +# ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/serialized src=/usr/share/{{ wikiver }}/serialized state=link # tags: # - mediawiki - name: Linking skins - file: dest=/srv/web/{{wikiname}}-wiki/skins src=/usr/share/{{ wikiver }}/skins state=link + ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/skins src=/usr/share/{{ wikiver }}/skins state=link tags: - mediawiki - name: Linking load - file: dest=/srv/web/{{wikiname}}-wiki/load.php src=/usr/share/{{ wikiver }}/load.php state=link + ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/load.php src=/usr/share/{{ wikiver }}/load.php state=link tags: - mediawiki - name: Linking resources - file: dest=/srv/web/{{wikiname}}-wiki/resources src=/usr/share/{{ wikiver }}/resources state=link + ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/resources src=/usr/share/{{ wikiver }}/resources state=link tags: - mediawiki - name: Linking vendor - file: dest=/srv/web/{{wikiname}}-wiki/vendor src=/usr/share/{{ wikiver }}/vendor state=link + ansible.builtin.file: dest=/srv/web/{{wikiname}}-wiki/vendor src=/usr/share/{{ wikiver }}/vendor state=link tags: - mediawiki @@ -244,7 +244,7 @@ - fedora-messaging - name: Create a directory for the php dependencies - file: + ansible.builtin.file: path: /srv/web/fp-wiki/extensions/FedoraMessaging/vendor owner: apache group: apache @@ -268,7 +268,7 @@ - fedora-messaging - name: Ensure a directory exists for our SELinux policy - file: dest=/usr/local/share/selinux/ state=directory + ansible.builtin.file: dest=/usr/local/share/selinux/ state=directory tags: selinux - name: Copy over our custom selinux policy diff --git a/roles/memcached/tasks/main.yml b/roles/memcached/tasks/main.yml index e303adfb46..7dd45ec558 100644 --- a/roles/memcached/tasks/main.yml +++ b/roles/memcached/tasks/main.yml @@ -21,7 +21,7 @@ - memcached - name: Make systemd override dir - file: state=directory path=/etc/systemd/system/memcached.service.d mode=0755 owner=root group=root + ansible.builtin.file: state=directory path=/etc/systemd/system/memcached.service.d mode=0755 owner=root group=root tags: - memcached when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7 diff --git a/roles/messaging/base/tasks/main.yml b/roles/messaging/base/tasks/main.yml index 38a3086355..81134ab0b7 100644 --- a/roles/messaging/base/tasks/main.yml +++ b/roles/messaging/base/tasks/main.yml @@ -7,12 +7,12 @@ - fedora-messaging - name: Create rabitmq directory - file: path=/etc/pki/rabbitmq/ owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/pki/rabbitmq/ owner=root group=root mode=0755 state=directory tags: - fedora-messaging -- name: "Create key/cert directory" - file: path=/etc/pki/rabbitmq/{{ item.username }}/ +- name: "create key/cert directory" + ansible.builtin.file: path=/etc/pki/rabbitmq/{{ item.username }}/ owner={{ item.username }} group={{ item.username }} mode=0700 state=directory with_items: "{{ messaging.certificates }}" diff --git a/roles/mirror_pagure_ansible/tasks/main.yml b/roles/mirror_pagure_ansible/tasks/main.yml index 78472a08a6..1eb4bcc858 100644 --- a/roles/mirror_pagure_ansible/tasks/main.yml +++ b/roles/mirror_pagure_ansible/tasks/main.yml @@ -32,7 +32,7 @@ # configure all the fedora-messaging files - name: Create /etc/pki/fedora-messaging - file: + ansible.builtin.file: dest: /etc/pki/fedora-messaging mode: "0775" owner: root @@ -81,7 +81,7 @@ # Install the script - name: Create /usr/local/libexec/mirror_pagure_ansible - file: + ansible.builtin.file: dest: /usr/local/libexec/mirror_pagure_ansible mode: "0775" owner: root diff --git a/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml b/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml index a40b56daae..dd07997d53 100644 --- a/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml +++ b/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml @@ -16,7 +16,7 @@ - mirrorlist_proxy - name: Setup directories - file: dest="{{item}}" mode=0755 state=directory + ansible.builtin.file: dest="{{item}}" mode=0755 state=directory with_items: - /srv/mirrorlist - /srv/mirrorlist/data @@ -27,7 +27,7 @@ - mirrorlist_proxy - name: Make sure the /usr/share/GeoIP/ directory exists - file: + ansible.builtin.file: path: /usr/share/GeoIP/ state: directory owner: root @@ -44,7 +44,7 @@ - mirrorlist_proxy - name: Make sure mirrormanager user can write new protobuf based cache file - file: dest="{{item}}" owner=mirrormanager group=mirrormanager + ansible.builtin.file: dest="{{item}}" owner=mirrormanager group=mirrormanager with_items: - /srv/mirrorlist/data - /srv/mirrorlist/data/mirrorlist1 @@ -53,14 +53,14 @@ - mirrorlist_proxy - name: For the rust based mirrorlist server chown directories - file: dest="{{item}}" owner=mirrormanager group=mirrormanager + ansible.builtin.file: dest="{{item}}" owner=mirrormanager group=mirrormanager with_items: - /var/log/mirrormanager tags: - mirrorlist_proxy - name: Ensure log file for content exists - file: dest="{{item}}" owner=mirrormanager group=mirrormanager mode=0755 state=touch + ansible.builtin.file: dest="{{item}}" owner=mirrormanager group=mirrormanager mode=0755 state=touch with_items: - /var/log/mirrormanager/mirrorlist1.service.log - /var/log/mirrormanager/mirrorlist2.service.log @@ -68,7 +68,7 @@ - mirrorlist_proxy - name: For the rust based mirrorlist server chown log files - file: dest="{{item}}" owner=mirrormanager group=mirrormanager + ansible.builtin.file: dest="{{item}}" owner=mirrormanager group=mirrormanager with_items: - /var/log/mirrormanager/mirrorlist1.service.log - /var/log/mirrormanager/mirrorlist2.service.log @@ -139,7 +139,7 @@ # Custom selinux policy to allow logrotate to rotate our mirrorlist logs - name: Ensure a directory exists for our custom selinux module - file: dest=/usr/local/share/mirrorlist-logrotate state=directory + ansible.builtin.file: dest=/usr/local/share/mirrorlist-logrotate state=directory tags: - selinux - mirrorlist_proxy diff --git a/roles/mote/handlers/main.yml b/roles/mote/handlers/main.yml index afa88ec40c..b6e6d45316 100644 --- a/roles/mote/handlers/main.yml +++ b/roles/mote/handlers/main.yml @@ -1,3 +1,3 @@ --- - name: Nuke mote json cache - file: dest=/var/cache/httpd/mote/cache.json state=absent + ansible.builtin.file: dest=/var/cache/httpd/mote/cache.json state=absent diff --git a/roles/mote/tasks/main.yml b/roles/mote/tasks/main.yml index 66ddf12c7e..30ce3740c4 100644 --- a/roles/mote/tasks/main.yml +++ b/roles/mote/tasks/main.yml @@ -20,7 +20,7 @@ - restart memcached - name: Make systemd override dir - file: + ansible.builtin.file: state: directory path: /etc/systemd/system/memcached.service.d mode: "0755" @@ -67,7 +67,7 @@ - restart apache - name: Create /usr/share/httpd/.local for mote-updater to store the fedmsg CRL - file: dest=/usr/share/httpd/.local owner=apache group=apache state=directory + ansible.builtin.file: dest=/usr/share/httpd/.local owner=apache group=apache state=directory tags: - mote @@ -78,7 +78,7 @@ - mote - name: Apply selinux type to static files - file: > + ansible.builtin.file: > dest=/usr/lib/python2.7/site-packages/mote/static/ setype=httpd_sys_content_t state=directory @@ -88,7 +88,7 @@ - selinux - name: Apply selinux type to meetbot files - file: > + ansible.builtin.file: > dest=/srv/web/meetbot/ setype=httpd_sys_content_t state=directory @@ -114,7 +114,7 @@ - selinux - name: Apply selinux type to the wsgi file - file: > + ansible.builtin.file: > dest=/usr/share/mote/mote.wsgi setype=httpd_sys_content_t tags: @@ -122,7 +122,7 @@ - selinux - name: Apply selinux type to the name mappings file - file: > + ansible.builtin.file: > dest=/usr/share/mote/name_mappings.json setype=httpd_sys_content_t notify: @@ -132,7 +132,7 @@ - selinux - name: Apply selinux type to the category mappings file - file: > + ansible.builtin.file: > dest=/usr/share/mote/category_mappings.json setype=httpd_sys_content_t notify: diff --git a/roles/nagios_client/tasks/main.yml b/roles/nagios_client/tasks/main.yml index e1e0549a4c..538feaa243 100644 --- a/roles/nagios_client/tasks/main.yml +++ b/roles/nagios_client/tasks/main.yml @@ -83,7 +83,7 @@ # Three tasks for handling our custom selinux module - name: Ensure a directory exists for our custom selinux module - file: dest=/usr/share/nrpe state=directory + ansible.builtin.file: dest=/usr/share/nrpe state=directory tags: - config - nagios_client diff --git a/roles/nagios_server/tasks/main.yml b/roles/nagios_server/tasks/main.yml index 509d66c89a..5a32747c43 100644 --- a/roles/nagios_server/tasks/main.yml +++ b/roles/nagios_server/tasks/main.yml @@ -87,7 +87,7 @@ ## Setup directories for files to be copied - name: Create or confirm directories to be made - file: dest={{item}} mode=2755 owner=root group=sysadmin-main state=directory + ansible.builtin.file: dest={{item}} mode=2755 owner=root group=sysadmin-main state=directory with_items: - /etc/nagios/commands - /etc/nagios/contacts @@ -102,12 +102,12 @@ ## Remove the items we don't want - name: Nuke default nagios passwd - file: dest=/etc/nagios/passwd state=absent + ansible.builtin.file: dest=/etc/nagios/passwd state=absent tags: - nagios_server - name: Nuke default nagios objects - file: dest=/etc/nagios/objects state=absent + ansible.builtin.file: dest=/etc/nagios/objects state=absent tags: - nagios_server @@ -266,7 +266,7 @@ ## Drop services we don't need - name: Nuke unneded services from /etc/nagios/services (External) - file: dest=/etc/nagios/services/{{ item }} state=absent + ansible.builtin.file: dest=/etc/nagios/services/{{ item }} state=absent with_items: - copr_external.cfg tags: @@ -334,7 +334,7 @@ - nagios_server - name: Configure perms on nrpe correctly - file: dest=/etc/nagios/nrpe.cfg mode=0644 group=root owner=root + ansible.builtin.file: dest=/etc/nagios/nrpe.cfg mode=0644 group=root owner=root tags: - config - nagios_server @@ -522,7 +522,7 @@ ## Handle selinux annoyances - roughly copied from fedmsg role - name: Ensure a directory exists for our custom selinux module - file: dest=/usr/local/share/nagios-policy state=directory + ansible.builtin.file: dest=/usr/local/share/nagios-policy state=directory tags: - nagios_server diff --git a/roles/openqa/dispatcher/tasks/main.yml b/roles/openqa/dispatcher/tasks/main.yml index 6fb891b359..8c3915fc06 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -191,7 +191,7 @@ - packages - name: Check tools directory exists with correct ownership - file: path=/root/fedora_openqa state=directory owner=root group=root + ansible.builtin.file: path=/root/fedora_openqa state=directory owner=root group=root # we don't want to run the checkout if the tests are on a non-standard # branch, as that usually means we're messing around on staging and @@ -236,7 +236,7 @@ - config - name: Create fedora_openqa config directory - file: path=/etc/fedora-openqa state=directory owner=root group=root mode=0755 + ansible.builtin.file: path=/etc/fedora-openqa state=directory owner=root group=root mode=0755 - name: Write schedule.conf template: src=schedule.conf.j2 dest=/etc/fedora-openqa/schedule.conf owner=root group=root mode=0600 @@ -246,7 +246,7 @@ - config - name: Remove old wikitcms credentials file - file: path=/etc/fedora/credentials state=absent + ansible.builtin.file: path=/etc/fedora/credentials state=absent tags: - config @@ -255,7 +255,7 @@ # them, as we used to have for the fedmsg user. But for now they run # as root and use this one. - name: Create /root/.openidc (wiki access token file location) - file: path=/root/.openidc state=directory owner=root group=root mode=0700 + ansible.builtin.file: path=/root/.openidc state=directory owner=root group=root mode=0700 - name: Write wikitcms token file for root copy: src={{ wikitcms_token }} dest=/root/.openidc/oidc_wikitcms.json owner=root group=root mode=0600 @@ -264,7 +264,7 @@ - config - name: Create /etc/pki/fedora-messaging - file: + ansible.builtin.file: dest: /etc/pki/fedora-messaging mode: "0775" owner: root @@ -355,7 +355,7 @@ when: "openqa_amqp_resultsdb_reporter_queue is defined and openqa_amqp_resultsdb_reporter_queue" - name: Create directory for consumer service config drop-in - file: path=/etc/systemd/system/fm-consumer@.service.d state=directory owner=root group=root mode=0755 + ansible.builtin.file: path=/etc/systemd/system/fm-consumer@.service.d state=directory owner=root group=root mode=0755 # This slows restarts of fm-consumer@ to every 60 seconds, instead of # near-instantly; this avoids huge floods of errors when resultsdb diff --git a/roles/openqa/server/tasks/main.yml b/roles/openqa/server/tasks/main.yml index 41fc0462f8..9f42a3dbbf 100644 --- a/roles/openqa/server/tasks/main.yml +++ b/roles/openqa/server/tasks/main.yml @@ -101,10 +101,10 @@ when: "openqa_static_uid is defined" - name: Remove old scratch repo directory - file: path=/var/tmp/scratchrepo state=absent + ansible.builtin.file: path=/var/tmp/scratchrepo state=absent - name: Delete old scratch build repo config - file: path=/etc/yum.repos.d/scratchrepo.repo state=absent + ansible.builtin.file: path=/etc/yum.repos.d/scratchrepo.repo state=absent - name: Write lab side repo config copy: src=openqa-lab-repo.repo dest=/etc/yum.repos.d/openqa-lab-repo.repo owner=root group=root mode=0644 @@ -151,7 +151,7 @@ - packages - name: Check test directory exists with correct ownership - file: path=/var/lib/openqa/share/tests/fedora state=directory owner=geekotest group=geekotest recurse=yes + ansible.builtin.file: path=/var/lib/openqa/share/tests/fedora state=directory owner=geekotest group=geekotest recurse=yes # we don't want to run the checkout if the tests are on a non-standard # branch, as that usually means we're messing around on staging and @@ -178,10 +178,10 @@ testsbranch.stdout.find('Changes not staged') == -1) - name: Remove old openqa_fedora_tools checkout - file: path=/root/openqa_fedora_tools state=absent + ansible.builtin.file: path=/root/openqa_fedora_tools state=absent - name: Create asset directories - file: path={{ item }} state=directory owner=geekotest group=geekotest mode=0775 + ansible.builtin.file: path={{ item }} state=directory owner=geekotest group=geekotest mode=0775 with_items: - /var/lib/openqa/share/factory/iso - /var/lib/openqa/share/factory/iso/fixed @@ -266,7 +266,7 @@ - openqa-gru - name: Create somewhere to stick our custom SELinux module - file: + ansible.builtin.file: path: /usr/local/share/selinux state: directory mode: '0755' diff --git a/roles/openqa/worker/tasks/createhdds.yml b/roles/openqa/worker/tasks/createhdds.yml index 3f75fa7cb8..78b897e203 100644 --- a/roles/openqa/worker/tasks/createhdds.yml +++ b/roles/openqa/worker/tasks/createhdds.yml @@ -34,7 +34,7 @@ when: "smtcheck.stdout is defined and smtcheck.stdout.find('is off') == -1" - name: Check createhdds directory exists with correct ownership - file: path=/root/createhdds state=directory owner=root group=root + ansible.builtin.file: path=/root/createhdds state=directory owner=root group=root # we don't want to run the checkout if createhdds is on a non-standard # branch, as that usually means we're messing around on staging and diff --git a/roles/openqa/worker/tasks/main.yml b/roles/openqa/worker/tasks/main.yml index f5952c0ec6..788e460f9d 100644 --- a/roles/openqa/worker/tasks/main.yml +++ b/roles/openqa/worker/tasks/main.yml @@ -63,10 +63,10 @@ --- - name: Remove old scratch repo directory - file: path=/var/tmp/scratchrepo state=absent + ansible.builtin.file: path=/var/tmp/scratchrepo state=absent - name: Delete old scratch build repo config - file: path=/etc/yum.repos.d/scratchrepo.conf state=absent + ansible.builtin.file: path=/etc/yum.repos.d/scratchrepo.conf state=absent - name: Write lab side repo config copy: src=openqa-lab-repo.repo dest=/etc/yum.repos.d/openqa-lab-repo.repo owner=root group=root mode=0644 @@ -219,7 +219,7 @@ when: "deployment_type is defined" - name: Remove wrongly-named kernel scheduler config file - file: path=/etc/udev/rules.d/60-block-scheduler-override.rules state=absent + ansible.builtin.file: path=/etc/udev/rules.d/60-block-scheduler-override.rules state=absent - name: Enable and start worker services service: name=openqa-worker@{{ item }} enabled=yes state=started diff --git a/roles/openqa/worker/tasks/nfs-client.yml b/roles/openqa/worker/tasks/nfs-client.yml index 9c59916510..165e9ff8c6 100644 --- a/roles/openqa/worker/tasks/nfs-client.yml +++ b/roles/openqa/worker/tasks/nfs-client.yml @@ -10,7 +10,7 @@ # We don't check ownership as, after mounting, it's owned by whatever the # UID of geekotest is on the server - name: Ensure mount target exists - file: path=/var/lib/openqa/share state=directory mode=0755 + ansible.builtin.file: path=/var/lib/openqa/share state=directory mode=0755 - name: Create mount unit template: src=var-lib-openqa-share.mount.j2 dest=/etc/systemd/system/var-lib-openqa-share.mount owner=root group=root mode=0644 diff --git a/roles/openshift-apps/coreos-ci/tasks/main.yaml b/roles/openshift-apps/coreos-ci/tasks/main.yaml index ec10dd22ce..ed5891b911 100644 --- a/roles/openshift-apps/coreos-ci/tasks/main.yaml +++ b/roles/openshift-apps/coreos-ci/tasks/main.yaml @@ -1,6 +1,6 @@ --- - name: Create the directories to hold the templates - file: + ansible.builtin.file: path: "/root/ocp4/openshift-apps/{{project_name}}" state: directory owner: root diff --git a/roles/openshift-apps/fedora-coreos-pipeline/tasks/main.yaml b/roles/openshift-apps/fedora-coreos-pipeline/tasks/main.yaml index c2dd0463d6..b6baa2bc18 100644 --- a/roles/openshift-apps/fedora-coreos-pipeline/tasks/main.yaml +++ b/roles/openshift-apps/fedora-coreos-pipeline/tasks/main.yaml @@ -1,6 +1,6 @@ --- - name: Create the directories to hold the templates - file: + ansible.builtin.file: path: "/root/ocp4/openshift-apps/{{project_name}}" state: directory owner: root diff --git a/roles/openshift-apps/firmitas/tasks/main.yml b/roles/openshift-apps/firmitas/tasks/main.yml index b1e4527231..601c12decf 100644 --- a/roles/openshift-apps/firmitas/tasks/main.yml +++ b/roles/openshift-apps/firmitas/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Ensures /root/ocp4/openshift-apps/firmitas/ dir exists - file: + ansible.builtin.file: path: "/root/ocp4/openshift-apps/firmitas/" state: directory diff --git a/roles/openshift/object-delete/tasks/main.yml b/roles/openshift/object-delete/tasks/main.yml index 8ba0be21a7..796645f984 100644 --- a/roles/openshift/object-delete/tasks/main.yml +++ b/roles/openshift/object-delete/tasks/main.yml @@ -1,12 +1,12 @@ --- - name: Delete object file ({{tmpfile.path}}) - file: + ansible.builtin.file: path=/etc/openshift_apps/{{object_delete_app}}/{{object_delete_objectname}}.yml state=absent when: object_delete_objecttype != 'project' - name: Delete project files ({{tmpfile.path}}) - file: + ansible.builtin.file: path=/etc/openshift_apps/{{object_delete_app}} state=absent when: object_delete_objecttype == 'project' diff --git a/roles/openshift/project/tasks/main.yml b/roles/openshift/project/tasks/main.yml index b16817379c..d9b86bba89 100644 --- a/roles/openshift/project/tasks/main.yml +++ b/roles/openshift/project/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Create project directory - file: + ansible.builtin.file: path: /etc/openshift_apps/{{project_app}} state: directory owner: root diff --git a/roles/openshift/sysadmin-openshift/tasks/resources.yaml b/roles/openshift/sysadmin-openshift/tasks/resources.yaml index b35fd70b03..1b2ce4a346 100644 --- a/roles/openshift/sysadmin-openshift/tasks/resources.yaml +++ b/roles/openshift/sysadmin-openshift/tasks/resources.yaml @@ -1,6 +1,6 @@ --- - name: Create the directories to hold the templates - file: + ansible.builtin.file: path: "/root/ocp4/openshift-apps/{{sysadmin_openshift_project_name}}" state: directory owner: root diff --git a/roles/openvpn/client/tasks/main.yml b/roles/openvpn/client/tasks/main.yml index 09c8501b3d..f0fd0ea263 100644 --- a/roles/openvpn/client/tasks/main.yml +++ b/roles/openvpn/client/tasks/main.yml @@ -51,7 +51,7 @@ - openvpn - name: Create directories for post-vpn service configs - file: path="/etc/systemd/system/{{item}}.service.d" state=directory + ansible.builtin.file: path="/etc/systemd/system/{{item}}.service.d" state=directory with_items: "{{postvpnservices}}" when: is_fedora is defined or (ansible_distribution_major_version|int >= 8 and ansible_distribution == 'RedHat') tags: diff --git a/roles/openvpn/server/tasks/main.yml b/roles/openvpn/server/tasks/main.yml index 9650882f30..2360230a07 100644 --- a/roles/openvpn/server/tasks/main.yml +++ b/roles/openvpn/server/tasks/main.yml @@ -10,7 +10,7 @@ - openvpn - name: Create the /etc/openvpn/server/ccd/ directory - file: > + ansible.builtin.file: > dest=/etc/openvpn/server/ccd/ mode=2755 owner=root diff --git a/roles/packager_alias/tasks/main.yml b/roles/packager_alias/tasks/main.yml index 91710da371..f045a11ff5 100644 --- a/roles/packager_alias/tasks/main.yml +++ b/roles/packager_alias/tasks/main.yml @@ -31,7 +31,7 @@ - packager_alias - name: Remove the old -owner email alias script - file: + ansible.builtin.file: path: /etc/cron.hourly/package-owner-aliases.sh state: absent tags: diff --git a/roles/packages3/web/tasks/main.yml b/roles/packages3/web/tasks/main.yml index 0490f8356a..c505c132c7 100644 --- a/roles/packages3/web/tasks/main.yml +++ b/roles/packages3/web/tasks/main.yml @@ -11,7 +11,7 @@ - packages/web - name: Create some directories - file: + ansible.builtin.file: path={{ item }} state=directory owner=apache @@ -26,7 +26,7 @@ - packages/web - name: Create some more locked down directories - file: path={{ item }} state=directory owner=apache group=apache mode=700 + ansible.builtin.file: path={{ item }} state=directory owner=apache group=apache mode=700 with_items: - /etc/pki/fedoracommunity tags: @@ -96,7 +96,7 @@ # Here's the indexer stuff - name: Create cache structure - file: > + ansible.builtin.file: > dest="/var/cache/fedoracommunity/{{item}}" state=directory owner=apache diff --git a/roles/pagure/tasks/main.yml b/roles/pagure/tasks/main.yml index 25aa89c397..13f4f3704c 100644 --- a/roles/pagure/tasks/main.yml +++ b/roles/pagure/tasks/main.yml @@ -114,14 +114,14 @@ - pagure - name: Create the /attachments folder - file: state=directory + ansible.builtin.file: state=directory path=/srv/attachments owner=git group=git mode=0775 tags: - pagure - name: Create the /var/log/pagure folder where to store the logs - file: state=directory + ansible.builtin.file: state=directory path=/var/log/pagure owner=git group=git mode=0775 tags: @@ -143,12 +143,12 @@ # This now fails when there are broken symlinks. Lets figure out a better way to do this - kevin # - name: Adjust owner of /srv/git -# file: name=/srv/git state=directory recurse=yes owner=git group=git +# ansible.builtin.file: name=/srv/git state=directory recurse=yes owner=git group=git # tags: # - gitolite - name: Create all the directories where we store the git repos - file: state=directory + ansible.builtin.file: state=directory path={{ item }} owner=git group=git mode=0775 with_items: @@ -162,7 +162,7 @@ - pagure - name: Create the /srv/tmp folder where to clone repos - file: state=directory + ansible.builtin.file: state=directory path=/srv/tmp owner=git group=git mode=0775 tags: @@ -273,7 +273,7 @@ - fedora-messaging - name: Create the config folder for fedora-messaging - file: path=/etc/fedora-messaging/ owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/fedora-messaging/ owner=root group=root mode=0755 state=directory tags: - pagure - fedora-messaging @@ -287,7 +287,7 @@ - fedora-messaging - name: Create folder where we'll place the certs - file: path=/etc/pki/rabbitmq/pagurecert/ owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/pki/rabbitmq/pagurecert/ owner=root group=root mode=0755 state=directory tags: - pagure - fedora-messaging @@ -346,7 +346,7 @@ # Set-up Pagure - name: Create the folders used for releases and archives - file: state=directory + ansible.builtin.file: state=directory path={{ item }} owner=git group=git mode=0775 with_items: diff --git a/roles/people/tasks/main.yml b/roles/people/tasks/main.yml index c373c070de..c8983686b1 100644 --- a/roles/people/tasks/main.yml +++ b/roles/people/tasks/main.yml @@ -236,17 +236,17 @@ - peoplequotas - name: Create repos directory - file: path=/project/repos state=directory owner=root group=fedora-contributor mode=0775 + ansible.builtin.file: path=/project/repos state=directory owner=root group=fedora-contributor mode=0775 tags: - people - name: Create repos link - file: state=link src=/project/repos dest=/srv/repos + ansible.builtin.file: state=link src=/project/repos dest=/srv/repos tags: - people - name: Create groups link - file: state=link src=/project dest=/srv/groups + ansible.builtin.file: state=link src=/project dest=/srv/groups tags: - people diff --git a/roles/planet/tasks/main.yml b/roles/planet/tasks/main.yml index 86b82e752a..44595735cb 100644 --- a/roles/planet/tasks/main.yml +++ b/roles/planet/tasks/main.yml @@ -26,7 +26,7 @@ - planet_server - name: Add base planet config directory - file: path=/etc/planet state=directory owner=root group=root mode=0775 + ansible.builtin.file: path=/etc/planet state=directory owner=root group=root mode=0775 tags: - planet_server @@ -47,7 +47,7 @@ - planet_server - name: Create planet directory - file: path={{ item }} state=directory owner=planet-user group=web mode=0775 + ansible.builtin.file: path={{ item }} state=directory owner=planet-user group=web mode=0775 with_items: - /srv/planet - /srv/planet/site @@ -81,7 +81,7 @@ # - name: Create planet directory (people) - file: path={{ item }} state=directory owner=planet-user group=web mode=0775 + ansible.builtin.file: path={{ item }} state=directory owner=planet-user group=web mode=0775 with_items: - /etc/planet/people - /srv/planet/config/people @@ -101,7 +101,7 @@ # - name: Create planet directory (design) - file: path={{ item }} state=directory owner=planet-user group=web mode=0775 + ansible.builtin.file: path={{ item }} state=directory owner=planet-user group=web mode=0775 with_items: - /etc/planet/design - /srv/planet/config/design @@ -128,7 +128,7 @@ # - name: Create planet directory (desktop) - file: path={{ item }} state=directory owner=planet-user group=web mode=0775 + ansible.builtin.file: path={{ item }} state=directory owner=planet-user group=web mode=0775 with_items: - /etc/planet/desktop - /srv/planet/config/desktop @@ -155,7 +155,7 @@ # - name: Create planet directory (edited) - file: path={{ item }} state=directory owner=planet-user group=web mode=0775 + ansible.builtin.file: path={{ item }} state=directory owner=planet-user group=web mode=0775 with_items: - /etc/planet/edited - /srv/planet/config/edited @@ -182,7 +182,7 @@ # - name: Create planet directory (people) - file: path={{ item }} state=directory owner=planet-user group=web mode=0775 + ansible.builtin.file: path={{ item }} state=directory owner=planet-user group=web mode=0775 with_items: - /etc/planet/people - /srv/planet/config/people @@ -214,7 +214,7 @@ # - name: Create planet directory (security) - file: path={{ item }} state=directory owner=planet-user group=web mode=0775 + ansible.builtin.file: path={{ item }} state=directory owner=planet-user group=web mode=0775 with_items: - /etc/planet/security - /srv/planet/config/security @@ -241,7 +241,7 @@ # - name: Create planet directory (summer-coding) - file: path={{ item }} state=directory owner=planet-user group=web mode=0775 + ansible.builtin.file: path={{ item }} state=directory owner=planet-user group=web mode=0775 with_items: - /etc/planet/summer-coding - /srv/planet/config/summer-coding @@ -268,7 +268,7 @@ # - name: Create planet directory (quality) - file: path={{ item }} state=directory owner=planet-user group=web mode=0775 + ansible.builtin.file: path={{ item }} state=directory owner=planet-user group=web mode=0775 with_items: - /etc/planet/quality - /srv/planet/config/quality @@ -291,7 +291,7 @@ - planet_server - name: Create /etc/pki/fedora-messaging - file: + ansible.builtin.file: dest: /etc/pki/fedora-messaging mode: "0775" owner: root diff --git a/roles/postgresql_server/tasks/main.yml b/roles/postgresql_server/tasks/main.yml index 4aaef242af..e3b3767cf2 100644 --- a/roles/postgresql_server/tasks/main.yml +++ b/roles/postgresql_server/tasks/main.yml @@ -132,7 +132,7 @@ - postgresql - name: Ensure postgres has a place to backup to - file: dest=/backups state=directory owner=postgres + ansible.builtin.file: dest=/backups state=directory owner=postgres tags: - postgresql diff --git a/roles/push-container-registry/tasks/main.yml b/roles/push-container-registry/tasks/main.yml index 40afd5149e..4bc8985eaf 100644 --- a/roles/push-container-registry/tasks/main.yml +++ b/roles/push-container-registry/tasks/main.yml @@ -15,7 +15,7 @@ - push-container-registry - name: Ensure cert dir exists - file: + ansible.builtin.file: path: "{{cert_dest_dir}}" state: directory tags: diff --git a/roles/rabbitmq_cluster/tasks/main.yml b/roles/rabbitmq_cluster/tasks/main.yml index bc2f17af83..c9cb7bc88e 100644 --- a/roles/rabbitmq_cluster/tasks/main.yml +++ b/roles/rabbitmq_cluster/tasks/main.yml @@ -37,7 +37,7 @@ - config - name: Create node cert directory - file: path=/etc/rabbitmq/nodecert/ owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/rabbitmq/nodecert/ owner=root group=root mode=0755 state=directory tags: - rabbitmq_cluster - config @@ -97,7 +97,7 @@ - config - name: Create RabbitMQ systemd override directory - file: + ansible.builtin.file: path: /etc/systemd/system/rabbitmq-server.service.d/ state: directory tags: @@ -399,7 +399,7 @@ - config - name: Create pubsub_federation cert directory - file: path=/etc/rabbitmq/pubsub_federation/ owner=root group=root mode=0755 state=directory + ansible.builtin.file: path=/etc/rabbitmq/pubsub_federation/ owner=root group=root mode=0755 state=directory tags: - rabbitmq_cluster - config diff --git a/roles/relvalconsumer/tasks/main.yml b/roles/relvalconsumer/tasks/main.yml index ba39e7d7a0..2f0b1d84b2 100644 --- a/roles/relvalconsumer/tasks/main.yml +++ b/roles/relvalconsumer/tasks/main.yml @@ -127,7 +127,7 @@ # really want openqa-stg creating stuff in the staging wiki all the # time. So in that case install the role but leave it disabled - name: Create /root/.openidc (token file location for manual runs as root) - file: path=/root/.openidc state=directory owner=root group=root mode=0700 + ansible.builtin.file: path=/root/.openidc state=directory owner=root group=root mode=0700 # - name: Write wikitcms token file for root # copy: src={{ wikitcms_token }} dest=/root/.openidc/oidc_wikitcms.json owner=root group=root mode=0600 @@ -155,7 +155,7 @@ - restart relvalconsumer - name: Create /etc/pki/fedora-messaging - file: + ansible.builtin.file: dest: /etc/pki/fedora-messaging mode: "0775" owner: root @@ -195,7 +195,7 @@ - config - name: Create python-bugzilla configuration directory - file: + ansible.builtin.file: dest: /root/.config/python-bugzilla mode: "0700" owner: root diff --git a/roles/repo2json/tasks/main.yml b/roles/repo2json/tasks/main.yml index f2d8a6eb1a..581f021f2a 100644 --- a/roles/repo2json/tasks/main.yml +++ b/roles/repo2json/tasks/main.yml @@ -11,7 +11,7 @@ - repo2json - name: Ensure that the output dir exists - file: dest=/srv/web/repo/json owner=root group=root mode=0755 state=directory + ansible.builtin.file: dest=/srv/web/repo/json owner=root group=root mode=0755 state=directory tags: - repo2json diff --git a/roles/review-stats/proxy/tasks/main.yml b/roles/review-stats/proxy/tasks/main.yml index 78c5d68618..ca4385fa8b 100644 --- a/roles/review-stats/proxy/tasks/main.yml +++ b/roles/review-stats/proxy/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Ensure dir for content exists - file: dest=/srv/web/review-stats owner=root group=root mode=0755 state=directory + ansible.builtin.file: dest=/srv/web/review-stats owner=root group=root mode=0755 state=directory tags: - review-stats - review-stats/proxy diff --git a/roles/robosignatory/tasks/main.yml b/roles/robosignatory/tasks/main.yml index 5e8ee481c5..ba13339db5 100644 --- a/roles/robosignatory/tasks/main.yml +++ b/roles/robosignatory/tasks/main.yml @@ -36,7 +36,7 @@ - robosignatory - name: Create config directory - file: + ansible.builtin.file: path: /etc/robosignatory state: directory owner: robosignatory @@ -47,7 +47,7 @@ - robosignatory - name: Create robosignatory sigul directory - file: + ansible.builtin.file: path: /etc/robosignatory/sigul state: directory owner: robosignatory @@ -71,7 +71,7 @@ - robosignatory - name: Make sure every file in the sigul conf dir has proper ownership - file: + ansible.builtin.file: path: /etc/sigul state: directory group: robosignatory @@ -105,7 +105,7 @@ # Fedora Messaging - name: Create /etc/pki/fedora-messaging - file: + ansible.builtin.file: dest: /etc/pki/fedora-messaging mode: "0775" owner: root @@ -167,7 +167,7 @@ - robosignatory-config - name: Create /etc/systemd/system/fm-consumer@.service.d (staging) - file: + ansible.builtin.file: state: directory path: /etc/systemd/system/fm-consumer@.service.d owner: root diff --git a/roles/rsnapshot-push/tasks/main.yml b/roles/rsnapshot-push/tasks/main.yml index be92cc73ee..b4bdc786b0 100644 --- a/roles/rsnapshot-push/tasks/main.yml +++ b/roles/rsnapshot-push/tasks/main.yml @@ -18,7 +18,7 @@ tags: rsnapshot_push - name: Server-side case-specific backup dir - file: + ansible.builtin.file: path: "{{ '/'.join([rsnapshot_push.backup_dir, item.key]) }}" state: directory owner: "{{ item.value.user }}" diff --git a/roles/sigul/server/tasks/main.yml b/roles/sigul/server/tasks/main.yml index d5fd84035f..a6dbd14650 100644 --- a/roles/sigul/server/tasks/main.yml +++ b/roles/sigul/server/tasks/main.yml @@ -58,7 +58,7 @@ - config - name: Setup gpg link on rhel7 - file: state=link src=/usr/bin/gpg1 dest=/usr/bin/gpg + ansible.builtin.file: state=link src=/usr/bin/gpg1 dest=/usr/bin/gpg when: ansible_distribution_major_version|int == 7 and ansible_distribution == 'RedHat' - name: Add polkit rules to allow sigul user to access the smartcard/yubikey diff --git a/roles/sudo/tasks/main.yml b/roles/sudo/tasks/main.yml index d0b80b6b63..468f02c966 100644 --- a/roles/sudo/tasks/main.yml +++ b/roles/sudo/tasks/main.yml @@ -26,7 +26,7 @@ - sudoers - name: Remove old sysadmin-main file if its still around - file: dest=/etc/sudoers.d/sysadmin-main state=absent + ansible.builtin.file: dest=/etc/sudoers.d/sysadmin-main state=absent tags: - config - sudo diff --git a/roles/supybot/tasks/main.yml b/roles/supybot/tasks/main.yml index 3b2efa6bb2..793dd9e668 100644 --- a/roles/supybot/tasks/main.yml +++ b/roles/supybot/tasks/main.yml @@ -14,7 +14,7 @@ - set_fact: botname={{ botnames[env] }} - name: Creating zodbot log dir - file: path={{ item }} state=directory owner=daemon + ansible.builtin.file: path={{ item }} state=directory owner=daemon with_items: - /var/lib/{{ botname }} - /var/lib/{{ botname }}/conf @@ -25,11 +25,11 @@ tags: supybot - name: Create teams directory - file: path=/srv/web/meetbot/teams state=directory owner=apache group=apache mode=0755 + ansible.builtin.file: path=/srv/web/meetbot/teams state=directory owner=apache group=apache mode=0755 tags: supybot - name: Create archives directory - file: path=/srv/web/meetbot/archives state=directory owner=apache group=apache mode=0755 + ansible.builtin.file: path=/srv/web/meetbot/archives state=directory owner=apache group=apache mode=0755 tags: supybot - name: Setup meetings_by_team script @@ -105,7 +105,7 @@ - inventory_hostname.startswith('value02') - name: Create /etc/pki/fedora-messaging - file: + ansible.builtin.file: dest: /etc/pki/fedora-messaging mode: "0775" state: directory diff --git a/roles/tftp_server/tasks/main.yml b/roles/tftp_server/tasks/main.yml index 3213e72a07..ebcf76b7e6 100644 --- a/roles/tftp_server/tasks/main.yml +++ b/roles/tftp_server/tasks/main.yml @@ -12,7 +12,7 @@ - tftp_server - name: Setup pxelinux.cfg dir - file: path=/var/lib/tftpboot/pxelinux.cfg mode=755 state=directory + ansible.builtin.file: path=/var/lib/tftpboot/pxelinux.cfg mode=755 state=directory tags: - config - tftp_server @@ -37,7 +37,7 @@ - tftp_server - name: Set permissions on the rhcos tftpboot folder - file: + ansible.builtin.file: path: /var/lib/tftpboot/rhcos mode: '0755' tags: diff --git a/roles/torrent/tasks/main.yml b/roles/torrent/tasks/main.yml index 8b063d62f4..e17442c65b 100644 --- a/roles/torrent/tasks/main.yml +++ b/roles/torrent/tasks/main.yml @@ -24,7 +24,7 @@ - config - name: Create the required directories - file: path={{ item.file }} owner={{ item.owner }} + ansible.builtin.file: path={{ item.file }} owner={{ item.owner }} group={{ item.group }} mode={{ item.mode }} state=directory with_items: - { file: /srv/web/stats/daily/, owner: opentracker, group: torrent, mode: 2775} diff --git a/roles/web-data-analysis/tasks/main.yml b/roles/web-data-analysis/tasks/main.yml index 2c740d1f19..9879dfb1ae 100644 --- a/roles/web-data-analysis/tasks/main.yml +++ b/roles/web-data-analysis/tasks/main.yml @@ -6,17 +6,17 @@ - web-data - name: Make sure the /usr/local/share/web-data-analysis directory exists - file: path=/usr/local/share/web-data-analysis state=directory + ansible.builtin.file: path=/usr/local/share/web-data-analysis state=directory tags: - web-data - name: Make the data directory - file: path=/mnt/fedora_stats/data state=directory mode=0755 + ansible.builtin.file: path=/mnt/fedora_stats/data state=directory mode=0755 tags: - web-data - name: Make the data subdirs - file: path=/mnt/fedora_stats/data/{{item}} state=directory mode=0755 + ansible.builtin.file: path=/mnt/fedora_stats/data/{{item}} state=directory mode=0755 with_items: [mirrors] tags: - web-data @@ -27,7 +27,7 @@ - web-data - name: Make a css tree - file: path=/var/www/html/css/ state=directory mode=0755 + ansible.builtin.file: path=/var/www/html/css/ state=directory mode=0755 tags: - web-data @@ -39,12 +39,12 @@ - web-data - name: Make the web directory exists - file: path=/var/www/html/csv-reports/ state=directory mode=0755 + ansible.builtin.file: path=/var/www/html/csv-reports/ state=directory mode=0755 tags: - web-data - name: Make the web subdirs - file: path=/var/www/html/csv-reports/{{item}} state=directory mode=0755 + ansible.builtin.file: path=/var/www/html/csv-reports/{{item}} state=directory mode=0755 with_items: [images, mirrors] tags: - web-data @@ -144,12 +144,12 @@ - web-data - name: Make countme web subdir - file: path=/var/www/html/csv-reports/countme state=directory mode=0775 owner=countme group=countme + ansible.builtin.file: path=/var/www/html/csv-reports/countme state=directory mode=0775 owner=countme group=countme tags: - web-data - name: Make countme local data dir - file: path=/var/lib/countme state=directory mode=0775 owner=countme group=countme + ansible.builtin.file: path=/var/lib/countme state=directory mode=0775 owner=countme group=countme tags: - web-data @@ -176,7 +176,7 @@ - cron - name: Remove old syncHttpLogs.sh cron script only on log01 - file: + ansible.builtin.file: path: /etc/cron.daily/syncHttpLogs.sh state: absent when: inventory_hostname.startswith('log01') @@ -204,7 +204,7 @@ - cron - name: Remove sync-http-logs.py from cron.daily directory - file: + ansible.builtin.file: path: /etc/cron.daily/sync-http-logs.py state: absent when: inventory_hostname.startswith('log01') @@ -219,7 +219,7 @@ - web-data - name: Make the awstats directory - file: path=/var/www/html/awstats-reports state=directory + ansible.builtin.file: path=/var/www/html/awstats-reports state=directory tags: - web-data @@ -230,7 +230,7 @@ - web-data - name: Remove separate daily cron job to merge old logs - file: + ansible.builtin.file: path: /etc/cron.d/combineHttp.cron state: absent tags: diff --git a/roles/weblate-backup/tasks/main.yml b/roles/weblate-backup/tasks/main.yml index feb5c4395e..50e608f2f7 100644 --- a/roles/weblate-backup/tasks/main.yml +++ b/roles/weblate-backup/tasks/main.yml @@ -14,7 +14,7 @@ - weblate_backup - name: Create a .ssh dir for that user - file: + ansible.builtin.file: dest: "/home/_backup_weblate/.ssh" mode: "0700" state: directory @@ -64,7 +64,7 @@ - weblate_backup - name: Create directory to mirror backups to - file: + ansible.builtin.file: dest: "{{ weblate_backup_topdir }}" mode: "0755" state: directory diff --git a/roles/yubikey/tasks/main.yml b/roles/yubikey/tasks/main.yml index 9929e6edab..9eb78790b8 100644 --- a/roles/yubikey/tasks/main.yml +++ b/roles/yubikey/tasks/main.yml @@ -19,7 +19,7 @@ - { file: ykval-config.php, dest: /etc/ykval/ykval-config.php } - name: Symlink the configuration files to /usr/share/... - file: src={{item.file}} dest={{ item.dest }} state=link + ansible.builtin.file: src={{item.file}} dest={{ item.dest }} state=link with_items: - {file: /etc/ykval/ykval-config.php, dest: /usr/share/ykval/ykval-config.php } - {file: /etc/ykksm/ykksm-config.php, dest: /usr/share/ykksm/ykksm-config.php } diff --git a/roles/zabbix/zabbix_agent/tasks/main.yml b/roles/zabbix/zabbix_agent/tasks/main.yml index 0c1572d410..a2eb26fa24 100644 --- a/roles/zabbix/zabbix_agent/tasks/main.yml +++ b/roles/zabbix/zabbix_agent/tasks/main.yml @@ -50,7 +50,7 @@ - zabbix_agent - name: Ensures config directory - file: + ansible.builtin.file: path: "{{ zabbix_agentd_dir }}" state: directory tags: @@ -77,7 +77,7 @@ - zabbix_agent - name: Ensuring we have a directory to put zabbix scripts - file: + ansible.builtin.file: state: directory path: /usr/lib/zabbix mode: "0770" @@ -87,7 +87,7 @@ - zabbix_agent - name: Ensuring we have a directory to put zabbix logs - file: + ansible.builtin.file: state: directory path: /var/log/zabbix mode: "0770" diff --git a/roles/zabbix/zabbix_server/tasks/create_keytab.yml b/roles/zabbix/zabbix_server/tasks/create_keytab.yml index 78f7baf653..5767605c2a 100644 --- a/roles/zabbix/zabbix_server/tasks/create_keytab.yml +++ b/roles/zabbix/zabbix_server/tasks/create_keytab.yml @@ -1,6 +1,6 @@ --- - name: Create the zabbix keytab path - file: + ansible.builtin.file: path: "/etc/openshift_apps/zabbix/" state: directory owner: root diff --git a/roles/zanata/tasks/main.yml b/roles/zanata/tasks/main.yml index 35dd2ed4da..ce13349f60 100644 --- a/roles/zanata/tasks/main.yml +++ b/roles/zanata/tasks/main.yml @@ -8,7 +8,7 @@ - zanata - name: Create directories - file: state=directory + ansible.builtin.file: state=directory path={{item}} owner=apache group=apache mode=0550 with_items: diff --git a/tasks/aws_cloud.yml b/tasks/aws_cloud.yml index f37aa364ba..09c3ef1d6a 100644 --- a/tasks/aws_cloud.yml +++ b/tasks/aws_cloud.yml @@ -59,7 +59,7 @@ - additional_known_hosts_cleanup[inventory_hostname] is defined - name: Remove old signed certificates - file: + ansible.builtin.file: path: "{{ item.path }}" state: absent loop: "{{ found_ssh_certs.files }}" diff --git a/tasks/cloud_setup_basic.yml b/tasks/cloud_setup_basic.yml index ea0a19cf66..224b0577bd 100644 --- a/tasks/cloud_setup_basic.yml +++ b/tasks/cloud_setup_basic.yml @@ -53,7 +53,7 @@ # note - kinda should be a handler - but handlers need args - name: Restorecon - file: path=/root/.ssh setype=ssh_home_t recurse=yes + ansible.builtin.file: path=/root/.ssh setype=ssh_home_t recurse=yes tags: - config diff --git a/tasks/swap.yml b/tasks/swap.yml index 846aba3db1..303ac25889 100644 --- a/tasks/swap.yml +++ b/tasks/swap.yml @@ -13,7 +13,7 @@ - swap - name: On BTRFS we need NoCOW - file: + ansible.builtin.file: path: "{{ swap_file_path }}" attr: +C when: @@ -31,7 +31,7 @@ - swap - name: Change swap file permissions - file: path="{{ swap_file_path }}" + ansible.builtin.file: path="{{ swap_file_path }}" owner=root group=root mode=0600 diff --git a/tasks/virt_instance_create.yml b/tasks/virt_instance_create.yml index 67b79fa4a5..b44789636c 100644 --- a/tasks/virt_instance_create.yml +++ b/tasks/virt_instance_create.yml @@ -12,7 +12,7 @@ - name: Ensure no old facts exist delegate_to: localhost - file: path=/root/.ansible_facts_cache/{{ inventory_hostname }} state=absent + ansible.builtin.file: path=/root/.ansible_facts_cache/{{ inventory_hostname }} state=absent when: inventory_hostname not in result.list_vms - name: Ensure the lv for the guest is made diff --git a/tasks/yumrepos.yml b/tasks/yumrepos.yml index 78e586a4a7..2d2dc3089f 100644 --- a/tasks/yumrepos.yml +++ b/tasks/yumrepos.yml @@ -133,7 +133,7 @@ - yumrepos - name: Make sure older infrastructure tags repos no longer exist - file: path="/etc/yum.repos.d/{{item}}" state=absent + ansible.builtin.file: path="/etc/yum.repos.d/{{item}}" state=absent with_items: - fedora-modular.repo - fedora-updates-modular.repo