ansiblelint fixes-- fqcn[action-core] - copy to ansible.builtin.copy

Replaces many references to 'copy' with ansible.builtin.copy

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This commit is contained in:
Ryan Lercho 2024-12-18 08:23:28 +10:00
parent 62952df107
commit 6a3816dfdc
217 changed files with 790 additions and 769 deletions

View file

@ -79,7 +79,7 @@
- packages
- name: Write out global-update-applied file if we updated
copy: content="updated" dest=/etc/sysconfig/global-update-applied
ansible.builtin.copy: content="updated" dest=/etc/sysconfig/global-update-applied
when: updated is defined
tags:
- packages

View file

@ -1,6 +1,6 @@
---
- name: Install the confine-ssh script
copy: >
ansible.builtin.copy: >
src={{files}}/scripts/confine-ssh.sh
dest=/usr/local/bin/confine-ssh.sh
mode=0755

View file

@ -6,35 +6,35 @@
- packages
- name: /etc/openvpn/ca.crt from vpn/openvpn/keys/ca.crt
copy: src="{{ private }}/files/vpn/openvpn/keys/ca.crt" dest=/etc/openvpn/ca.crt mode=0600 owner=root group=root
ansible.builtin.copy: src="{{ private }}/files/vpn/openvpn/keys/ca.crt" dest=/etc/openvpn/ca.crt mode=0600 owner=root group=root
tags:
- config
notify:
- restart openvpn
# - name: /etc/openvpn/crl.pem from vpn/openvpn/keys/crl.pem
# copy: src="{{ private }}/vpn/openvpn/keys/crl.pem" dest=/etc/openvpn/crl.pem mode=0644 owner=root group=root
# ansible.builtin.copy: src="{{ private }}/vpn/openvpn/keys/crl.pem" dest=/etc/openvpn/crl.pem mode=0644 owner=root group=root
# tags:
# - config
# notify:
# - restart openvpn
- name: /etc/openvpn/openvpn.conf
copy: src="{{ files }}/openvpn/client.conf" dest=/etc/openvpn/openvpn.conf
ansible.builtin.copy: src="{{ files }}/openvpn/client.conf" dest=/etc/openvpn/openvpn.conf
tags:
- config
notify:
- restart openvpn
- name: /etc/openvpn/client.crt
copy: src="{{ private }}/files/vpn/openvpn/keys/{{ inventory_hostname }}.crt" dest=/etc/openvpn/client.crt mode=0600 owner=root group=root
ansible.builtin.copy: src="{{ private }}/files/vpn/openvpn/keys/{{ inventory_hostname }}.crt" dest=/etc/openvpn/client.crt mode=0600 owner=root group=root
tags:
- config
notify:
- restart openvpn
- name: /etc/openvpn/client.key
copy: src="{{ private }}/files/vpn/openvpn/keys/{{ inventory_hostname }}.key" dest=/etc/openvpn/client.key mode=0600 owner=root group=root
ansible.builtin.copy: src="{{ private }}/files/vpn/openvpn/keys/{{ inventory_hostname }}.key" dest=/etc/openvpn/client.key mode=0600 owner=root group=root
tags:
- config
notify:

View file

@ -6,35 +6,35 @@
- packages
- name: /etc/openvpn/ca.crt from vpn/openvpn/keys/ca.crt
copy: src="{{ private }}/files/vpn/openvpn/keys/ca.crt" dest=/etc/openvpn/ca.crt mode=0600 owner=root group=root
ansible.builtin.copy: src="{{ private }}/files/vpn/openvpn/keys/ca.crt" dest=/etc/openvpn/ca.crt mode=0600 owner=root group=root
tags:
- config
notify:
- restart openvpn 7
# - name: /etc/openvpn/crl.pem from vpn/openvpn/keys/crl.pem
# copy: src="{{ private }}/vpn/openvpn/keys/crl.pem" dest=/etc/openvpn/crl.pem mode=0644 owner=root group=root
# ansible.builtin.copy: src="{{ private }}/vpn/openvpn/keys/crl.pem" dest=/etc/openvpn/crl.pem mode=0644 owner=root group=root
# tags:
# - config
# notify:
# - restart openvpn
- name: /etc/openvpn/openvpn.conf
copy: src="{{ files }}/openvpn/client.conf" dest=/etc/openvpn/openvpn.conf
ansible.builtin.copy: src="{{ files }}/openvpn/client.conf" dest=/etc/openvpn/openvpn.conf
tags:
- config
notify:
- restart openvpn 7
- name: /etc/openvpn/client.crt
copy: src="{{ private }}/files/vpn/openvpn/keys/{{ inventory_hostname }}.crt" dest=/etc/openvpn/client.crt mode=0600 owner=root group=root
ansible.builtin.copy: src="{{ private }}/files/vpn/openvpn/keys/{{ inventory_hostname }}.crt" dest=/etc/openvpn/client.crt mode=0600 owner=root group=root
tags:
- config
notify:
- restart openvpn 7
- name: /etc/openvpn/client.key
copy: src="{{ private }}/files/vpn/openvpn/keys/{{ inventory_hostname }}.key" dest=/etc/openvpn/client.key mode=0600 owner=root group=root
ansible.builtin.copy: src="{{ private }}/files/vpn/openvpn/keys/{{ inventory_hostname }}.key" dest=/etc/openvpn/client.key mode=0600 owner=root group=root
tags:
- config
notify:

View file

@ -6,7 +6,7 @@
- packages
- name: /etc/postfix/main.cf
copy: src={{ item }} dest=/etc/postfix/main.cf
ansible.builtin.copy: src={{ item }} dest=/etc/postfix/main.cf
with_first_found:
- "{{ postfix_maincf }}"
- "{{ roles_path }}/base/files/postfix/main.cf/main.cf.{{ ansible_fqdn }}"

View file

@ -10,11 +10,11 @@
- packages
- name: Setup rdiff backup script
copy: src="{{ files }}/rdiff-backup/run-rdiff-backups" dest=/usr/local/bin/run-rdiff-backups mode=755
ansible.builtin.copy: src="{{ files }}/rdiff-backup/run-rdiff-backups" dest=/usr/local/bin/run-rdiff-backups mode=755
tags:
- config
- name: Setup rdiff backup cron
copy: src="{{ files }}/rdiff-backup/run-rdiff-backups.cron" dest=/etc/cron.d/run-rdiff-backups
ansible.builtin.copy: src="{{ files }}/rdiff-backup/run-rdiff-backups.cron" dest=/etc/cron.d/run-rdiff-backups
tags:
- config

View file

@ -6,21 +6,21 @@
- regserver
- name: Copy reg-server repositories html template
copy:
ansible.builtin.copy:
src: "{{files}}/reg-server/repositories.html"
dest: "/var/lib/reg-server/templates/repositories.html"
tags:
- regserver
- name: Copy reg-server tags html template
copy:
ansible.builtin.copy:
src: "{{files}}/reg-server/tags.html"
dest: "/var/lib/reg-server/templates/tags.html"
tags:
- regserver
- name: Install cronjob file
copy:
ansible.builtin.copy:
src: "{{files}}/reg-server/cron-prod"
dest: "/etc/cron.d/reg-server"
when: env == "production"
@ -28,7 +28,7 @@
- regserver
- name: Install cronjob file - stg
copy:
ansible.builtin.copy:
src: "{{files}}/reg-server/cron-stg"
dest: "/etc/cron.d/reg-server"
when: env == "staging"
@ -36,14 +36,14 @@
- regserver
- name: Copy fedora icon
copy:
ansible.builtin.copy:
src: "{{files}}/reg-server/fedora.png"
dest: "/var/lib/reg-server/static/fedora.png"
tags:
- regserver
- name: Copy custom styles.css
copy:
ansible.builtin.copy:
src: "{{files}}/reg-server/styles.css"
dest: "/var/lib/reg-server/static/css/styles.css"
tags:

View file

@ -1,7 +1,7 @@
---
- name: Upstart serial setup
copy: src="{{ files }}/common/ttyS0.conf" dest=/etc/init/ttyS0.conf
ansible.builtin.copy: src="{{ files }}/common/ttyS0.conf" dest=/etc/init/ttyS0.conf
when: is_rhel is defined
tags:
- configs

View file

@ -4,7 +4,7 @@
---
- name: Touch an empty file that we will use for swap
copy:
ansible.builtin.copy:
content: ""
dest: "{{ swap_file_path }}"
force: no

View file

@ -27,7 +27,7 @@
- yumrepos
- name: Put rhel repos on rhel systems
copy: src="{{ files }}/common/rhel{{ ansible_distribution_major_version|int }}.repo" dest="/etc/yum.repos.d/rhel{{ ansible_distribution_major_version|int }}.repo"
ansible.builtin.copy: src="{{ files }}/common/rhel{{ ansible_distribution_major_version|int }}.repo" dest="/etc/yum.repos.d/rhel{{ ansible_distribution_major_version|int }}.repo"
when: ansible_distribution == 'RedHat' and not inventory_hostname.startswith('ppc9') and datacenter != "aws"
tags:
- config
@ -35,7 +35,7 @@
- yumrepos
- name: Put rhel repos on rhel systems (power9)
copy: src="{{ files }}/common/rhel{{ ansible_distribution_major_version|int }}-power9.repo" dest="/etc/yum.repos.d/rhel{{ ansible_distribution_major_version|int }}.repo"
ansible.builtin.copy: src="{{ files }}/common/rhel{{ ansible_distribution_major_version|int }}-power9.repo" dest="/etc/yum.repos.d/rhel{{ ansible_distribution_major_version|int }}.repo"
when: ansible_distribution == 'RedHat' and inventory_hostname.startswith('ppc9') and datacenter != "aws"
tags:
- config
@ -43,7 +43,7 @@
- yumrepos
- name: Put epel repos on el systems
copy: src="{{ files }}/common/epel{{ ansible_distribution_major_version|int }}.repo" dest="/etc/yum.repos.d/epel{{ ansible_distribution_major_version|int }}.repo"
ansible.builtin.copy: src="{{ files }}/common/epel{{ ansible_distribution_major_version|int }}.repo" dest="/etc/yum.repos.d/epel{{ ansible_distribution_major_version|int }}.repo"
when: ((ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS') and use_default_epel) and datacenter != "aws"
tags:
- config
@ -51,7 +51,7 @@
- yumrepos
- name: Put epel repos on el systems (aws)
copy: src="{{ files }}/common/original-epel{{ ansible_distribution_major_version|int }}.repo" dest="/etc/yum.repos.d/epel{{ ansible_distribution_major_version|int }}.repo"
ansible.builtin.copy: src="{{ files }}/common/original-epel{{ ansible_distribution_major_version|int }}.repo" dest="/etc/yum.repos.d/epel{{ ansible_distribution_major_version|int }}.repo"
when: ((ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS') and use_default_epel) and datacenter == "aws"
tags:
- config
@ -59,7 +59,7 @@
- yumrepos
- name: Put epel gpg key on el systems (aws)
copy: src="{{ files }}/common/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version|int }}" dest="/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version|int }}"
ansible.builtin.copy: src="{{ files }}/common/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version|int }}" dest="/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version|int }}"
when: ((ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS') and use_default_epel) and datacenter == "aws"
tags:
- config
@ -101,7 +101,7 @@
- yumrepos
- name: Add infrastructure tags repo - RHEL
copy: src="{{ files }}/common/rhel-infra-tags.repo" dest="/etc/yum.repos.d/infra-tags.repo"
ansible.builtin.copy: src="{{ files }}/common/rhel-infra-tags.repo" dest="/etc/yum.repos.d/infra-tags.repo"
when: ((ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS'))
tags:
- config
@ -109,7 +109,7 @@
- yumrepos
- name: Add infrastructure STAGING tags repo - RHEL
copy: src="{{ files }}/common/rhel-infra-tags-stg.repo" dest="/etc/yum.repos.d/infra-tags-stg.repo"
ansible.builtin.copy: src="{{ files }}/common/rhel-infra-tags-stg.repo" dest="/etc/yum.repos.d/infra-tags-stg.repo"
when: (ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS') and env in ['staging', 'pagure-staging']
tags:
- config
@ -117,7 +117,7 @@
- yumrepos
- name: Add infrastructure tags repo - Fedora
copy: src="{{ files }}/common/fedora-infra-tags.repo" dest="/etc/yum.repos.d/infra-tags.repo"
ansible.builtin.copy: src="{{ files }}/common/fedora-infra-tags.repo" dest="/etc/yum.repos.d/infra-tags.repo"
when: ansible_distribution == 'Fedora'
tags:
- config
@ -125,7 +125,7 @@
- yumrepos
- name: Add infrastructure STAGING tags repo - Fedora
copy: src="{{ files }}/common/fedora-infra-tags-stg.repo" dest="/etc/yum.repos.d/infra-tags-stg.repo"
ansible.builtin.copy: src="{{ files }}/common/fedora-infra-tags-stg.repo" dest="/etc/yum.repos.d/infra-tags-stg.repo"
when: ansible_distribution == 'Fedora' and env in ['staging', 'pagure-staging']
tags:
- config