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

Replaces many references to  command: with ansible.builtin.command

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This commit is contained in:
Ryan Lercho 2024-12-19 11:22:24 +10:00
parent 6a3816dfdc
commit 462176464b
145 changed files with 366 additions and 366 deletions

View file

@ -3,10 +3,10 @@
# #
--- ---
- name: reload systemd - name: reload systemd
command: systemctl daemon-reload ansible.builtin.command: systemctl daemon-reload
- name: restart apache - name: restart apache
command: /usr/local/bin/conditional-restart.sh httpd httpd ansible.builtin.command: /usr/local/bin/conditional-restart.sh httpd httpd
- name: reload apache - name: reload apache
action: service name=httpd state=reloaded action: service name=httpd state=reloaded
@ -18,31 +18,31 @@
action: service name=crond state=restarted action: service name=crond state=restarted
- name: restart fedmsg-gateway - name: restart fedmsg-gateway
command: /usr/local/bin/conditional-restart.sh fedmsg-gateway ansible.builtin.command: /usr/local/bin/conditional-restart.sh fedmsg-gateway
- name: restart fedmsg-hub - name: restart fedmsg-hub
command: /usr/local/bin/conditional-restart.sh {{ item }} ansible.builtin.command: /usr/local/bin/conditional-restart.sh {{ item }}
with_items: with_items:
- fedmsg-hub - fedmsg-hub
- fedmsg-hub-3 - fedmsg-hub-3
- name: restart fedmsg-hub-3 - name: restart fedmsg-hub-3
command: /usr/local/bin/conditional-restart.sh {{ item }} ansible.builtin.command: /usr/local/bin/conditional-restart.sh {{ item }}
with_items: with_items:
- fedmsg-hub - fedmsg-hub
- fedmsg-hub-3 - fedmsg-hub-3
- name: restart fedmsg-irc - name: restart fedmsg-irc
command: /usr/local/bin/conditional-restart.sh fedmsg-irc ansible.builtin.command: /usr/local/bin/conditional-restart.sh fedmsg-irc
- name: restart fedmsg-relay - name: restart fedmsg-relay
command: /usr/local/bin/conditional-restart.sh fedmsg-relay ansible.builtin.command: /usr/local/bin/conditional-restart.sh fedmsg-relay
- name: restart fm-consumer@koji_sync_listener - name: restart fm-consumer@koji_sync_listener
action: service name=fm-consumer@koji_sync_listener state=restarted enabled=yes action: service name=fm-consumer@koji_sync_listener state=restarted enabled=yes
- name: reload httpd - name: reload httpd
command: /usr/local/bin/conditional-reload.sh httpd httpd ansible.builtin.command: /usr/local/bin/conditional-reload.sh httpd httpd
- name: restart iptables - name: restart iptables
action: service name=iptables state=restarted action: service name=iptables state=restarted
@ -98,22 +98,22 @@
action: service name=network state=restarted action: service name=network state=restarted
- name: rebuild postfix transport - name: rebuild postfix transport
command: /usr/sbin/postmap /etc/postfix/transport ansible.builtin.command: /usr/sbin/postmap /etc/postfix/transport
- name: rebuild postfix bysender - name: rebuild postfix bysender
command: /usr/sbin/postmap /etc/postfix/bysender ansible.builtin.command: /usr/sbin/postmap /etc/postfix/bysender
- name: rebuild postfix tls_policy - name: rebuild postfix tls_policy
command: /usr/sbin/postmap /etc/postfix/tls_policy ansible.builtin.command: /usr/sbin/postmap /etc/postfix/tls_policy
- name: restart postfix - name: restart postfix
service: name=postfix state=restarted service: name=postfix state=restarted
- name: reload proxyhttpd - name: reload proxyhttpd
command: /usr/local/bin/proxy-conditional-reload.sh httpd httpd ansible.builtin.command: /usr/local/bin/proxy-conditional-reload.sh httpd httpd
- name: run rkhunter - name: run rkhunter
command: rkhunter --propupd ansible.builtin.command: rkhunter --propupd
- name: restart moksha-hub - name: restart moksha-hub
service: name=moksha-hub state=restarted service: name=moksha-hub state=restarted
@ -139,7 +139,7 @@
service: name=pagure_ev state=restarted service: name=pagure_ev state=restarted
- name: "update ca-trust" - name: "update ca-trust"
command: /usr/bin/update-ca-trust ansible.builtin.command: /usr/bin/update-ca-trust
- name: restart stunnel - name: restart stunnel
service: name=stunnel state=restarted service: name=stunnel state=restarted
@ -151,20 +151,20 @@
service: name=NetworkManager state=restarted service: name=NetworkManager state=restarted
- name: reload NetworkManager-connections - name: reload NetworkManager-connections
command: nmcli c reload ansible.builtin.command: nmcli c reload
- name: restart basset-worker - name: restart basset-worker
service: name=basset-worker state=restarted service: name=basset-worker state=restarted
- name: apply interface-changes - name: apply interface-changes
command: nmcli con up {{ item.split()[1] }} ansible.builtin.command: nmcli con up {{ item.split()[1] }}
async: 1 async: 1
poll: 0 poll: 0
loop: "{{ if_uuid.stdout_lines|flatten(levels=1) }}" loop: "{{ if_uuid.stdout_lines|flatten(levels=1) }}"
when: item.split()[1] not in ansible_ifcfg_disabled when: item.split()[1] not in ansible_ifcfg_disabled
- name: flush journald tmpfiles to persistent store - name: flush journald tmpfiles to persistent store
command: pkill -f -USR1 systemd-journald ansible.builtin.command: pkill -f -USR1 systemd-journald
- name: restart idmapd - name: restart idmapd
service: name=nfs-idmapd state=restarted service: name=nfs-idmapd state=restarted

View file

@ -33,7 +33,7 @@
# #
- name: Make dnf recheck for new metadata from repos - name: Make dnf recheck for new metadata from repos
command: dnf clean expire-cache ansible.builtin.command: dnf clean expire-cache
- name: Check for updates (dnf) - name: Check for updates (dnf)
dnf: list=updates dnf: list=updates

View file

@ -144,7 +144,7 @@
- fileverify - fileverify
- name: Get locally changed files (excluding config files) - name: Get locally changed files (excluding config files)
command: "egrep -v ' c /' {{ localchanges.stdout }}" ansible.builtin.command: "egrep -v ' c /' {{ localchanges.stdout }}"
register: rpm_va_nc register: rpm_va_nc
changed_when: false changed_when: false
when: localchanges is defined and localchanges.stdout != "" when: localchanges is defined and localchanges.stdout != ""
@ -161,7 +161,7 @@
- fileverify - fileverify
- name: 'Whitelist - Get locally changed files (config files)' - name: 'Whitelist - Get locally changed files (config files)'
command: "egrep ' c /' {{ localchanges.stdout }}" ansible.builtin.command: "egrep ' c /' {{ localchanges.stdout }}"
register: rpm_va_c register: rpm_va_c
when: localchanges is defined and localchanges.stdout != "" when: localchanges is defined and localchanges.stdout != ""
changed_when: false changed_when: false

View file

@ -5,4 +5,4 @@
tasks: tasks:
- name: Clear memcache - name: Clear memcache
command: echo flush_all | nc localhost 11211 ansible.builtin.command: echo flush_all | nc localhost 11211

View file

@ -6,4 +6,4 @@
tasks: tasks:
- name: Clear varnish - name: Clear varnish
command: varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 ban req.url == . ansible.builtin.command: varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 ban req.url == .

View file

@ -13,10 +13,10 @@
# This doesn't really remove the pid file.. but we say it does so ansible only runs it if the pid file is there.. # This doesn't really remove the pid file.. but we say it does so ansible only runs it if the pid file is there..
- name: Really kill postfix master process - name: Really kill postfix master process
command: pkill -u root master removes=/var/spool/postfix/pid/master.pid ansible.builtin.command: pkill -u root master removes=/var/spool/postfix/pid/master.pid
- name: Clean up old pid lock file. - name: Clean up old pid lock file.
command: rm /var/spool/postfix/pid/master.pid removes=/var/spool/postfix/pid/master.pid ansible.builtin.command: rm /var/spool/postfix/pid/master.pid removes=/var/spool/postfix/pid/master.pid
- name: Try to start postfix cleanly - name: Try to start postfix cleanly
service: name=postfix state=started service: name=postfix state=started

View file

@ -42,5 +42,5 @@
delegate_to: "{{ vmhost }}" delegate_to: "{{ vmhost }}"
- name: Destroy the lv - name: Destroy the lv
command: /sbin/lvremove -f {{volgroup}}/{{inventory_hostname}} ansible.builtin.command: /sbin/lvremove -f {{volgroup}}/{{inventory_hostname}}
delegate_to: "{{ vmhost }}" delegate_to: "{{ vmhost }}"

View file

@ -153,5 +153,5 @@
ignore_errors: true ignore_errors: true
- name: make sure selinux contexts are right on srv - name: make sure selinux contexts are right on srv
command: restorecon -R /srv ansible.builtin.command: restorecon -R /srv
changed_when: false changed_when: false

View file

@ -14,13 +14,13 @@
ignore_errors: true ignore_errors: true
- name: Reboot the host - name: Reboot the host
command: /sbin/shutdown -r 1 ansible.builtin.command: /sbin/shutdown -r 1
- name: Wait for host to come back - up to 15 minutes - name: Wait for host to come back - up to 15 minutes
local_action: wait_for host={{ target }} port=22 delay=120 timeout=900 search_regex=OpenSSH local_action: wait_for host={{ target }} port=22 delay=120 timeout=900 search_regex=OpenSSH
# - name: Sync time # - name: Sync time
# command: ntpdate -u 1.rhel.pool.ntp.org # ansible.builtin.command: ntpdate -u 1.rhel.pool.ntp.org
- name: Tell nagios to unshush - name: Tell nagios to unshush
nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }} nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }}

View file

@ -11,10 +11,10 @@
tasks: tasks:
- name: Expire-caches - name: Expire-caches
command: yum clean expire-cache ansible.builtin.command: yum clean expire-cache
- name: Yum -y {{ yumcommand }} - name: Yum -y {{ yumcommand }}
command: yum -y {{ yumcommand }} ansible.builtin.command: yum -y {{ yumcommand }}
async: 7200 async: 7200
poll: 30 poll: 30
@ -24,10 +24,10 @@
tasks: tasks:
- name: Check for rkhunter - name: Check for rkhunter
command: /usr/bin/test -f /usr/bin/rkhunter ansible.builtin.command: /usr/bin/test -f /usr/bin/rkhunter
register: rkhunter register: rkhunter
ignore_errors: true ignore_errors: true
- name: Run rkhunter --propupd - name: Run rkhunter --propupd
command: /usr/bin/rkhunter --propupd ansible.builtin.command: /usr/bin/rkhunter --propupd
when: rkhunter is success when: rkhunter is success

View file

@ -42,7 +42,7 @@
- selinux - selinux
- name: allow alternate ntpd port - name: allow alternate ntpd port
command: semanage port -a -t ntp_port_t -p tcp 124 ansible.builtin.command: semanage port -a -t ntp_port_t -p tcp 124
when: '"124" not in ntp_selinux_port' when: '"124" not in ntp_selinux_port'
failed_when: false failed_when: false
tags: tags:
@ -50,7 +50,7 @@
- selinux - selinux
- name: allow alternate ntpd port - name: allow alternate ntpd port
command: semanage port -a -t ntp_port_t -p udp 124 ansible.builtin.command: semanage port -a -t ntp_port_t -p udp 124
when: '"124" not in ntp_selinux_port' when: '"124" not in ntp_selinux_port'
failed_when: false failed_when: false
tags: tags:

View file

@ -52,7 +52,7 @@
- selinux - selinux
- name: allow alternate ntpd port - name: allow alternate ntpd port
command: semanage port -a -t ntp_port_t -p tcp 124 ansible.builtin.command: semanage port -a -t ntp_port_t -p tcp 124
when: '"124" not in ntp_selinux_port' when: '"124" not in ntp_selinux_port'
failed_when: false failed_when: false
tags: tags:
@ -60,7 +60,7 @@
- selinux - selinux
- name: allow alternate ntpd port - name: allow alternate ntpd port
command: semanage port -a -t ntp_port_t -p udp 124 ansible.builtin.command: semanage port -a -t ntp_port_t -p udp 124
when: '"124" not in ntp_selinux_port' when: '"124" not in ntp_selinux_port'
failed_when: false failed_when: false
tags: tags:

View file

@ -20,7 +20,7 @@
- httpd/website - httpd/website
- name: Check the selinux context of webdir - name: Check the selinux context of webdir
command: matchpathcon /srv/web ansible.builtin.command: matchpathcon /srv/web
register: webdir register: webdir
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -31,7 +31,7 @@
- httpd/website - httpd/website
- name: /srv/web file contexts - name: /srv/web file contexts
command: semanage fcontext -a -t httpd_sys_content_t "/srv/web(/.*)?" ansible.builtin.command: semanage fcontext -a -t httpd_sys_content_t "/srv/web(/.*)?"
when: webdir.stdout.find('httpd_sys_content_t') == -1 when: webdir.stdout.find('httpd_sys_content_t') == -1
tags: tags:
- config - config

View file

@ -9,7 +9,7 @@
strategy: free strategy: free
tasks: tasks:
# Non-huge SAR retrieval # Non-huge SAR retrieval
- command: "{{ gdpr_delete_script }}" - ansible.builtin.command: "{{ gdpr_delete_script }}"
environment: environment:
SAR_USERNAME: "{{ gdpr_delete_fas_user }}" SAR_USERNAME: "{{ gdpr_delete_fas_user }}"
SAR_EMAIL: "{{ gdpr_delete_email }}" SAR_EMAIL: "{{ gdpr_delete_email }}"

View file

@ -9,7 +9,7 @@
- name: "Create the archive" - name: "Create the archive"
block: block:
# Create a safe place to store the files. # Create a safe place to store the files.
- command: "mktemp -d" - ansible.builtin.command: "mktemp -d"
register: sar_tmp_dir register: sar_tmp_dir
# Let's make this a more conveniently expressed variable. # Let's make this a more conveniently expressed variable.
- set_fact: - set_fact:
@ -20,7 +20,7 @@
strategy: free strategy: free
tasks: tasks:
# Non-huge SAR retrieval # Non-huge SAR retrieval
- command: "{{ sar_script }}" - ansible.builtin.command: "{{ sar_script }}"
environment: environment:
SAR_USERNAME: "{{ sar_fas_user }}" SAR_USERNAME: "{{ sar_fas_user }}"
SAR_EMAIL: "{{ sar_email }}" SAR_EMAIL: "{{ sar_email }}"
@ -36,7 +36,7 @@
delegate_facts: false delegate_facts: false
when: "sar_huge is not defined or not sar_huge" when: "sar_huge is not defined or not sar_huge"
# Remove the variable from memory # Remove the variable from memory
- command: "/bin/true" - ansible.builtin.command: "/bin/true"
register: sar_data register: sar_data
when: "sar_huge is not defined or not sar_huge" when: "sar_huge is not defined or not sar_huge"
@ -61,7 +61,7 @@
args: args:
chdir: "{{ sar_tmp_dir }}" chdir: "{{ sar_tmp_dir }}"
# Move the tarball into the desired pick up location. # Move the tarball into the desired pick up location.
- command: "mv {{ sar_tmp_dir }}/{{ sar_fas_user }}_{{ sar_email }}.tar.gz {{ sar_tar_output_path }}" - ansible.builtin.command: "mv {{ sar_tmp_dir }}/{{ sar_fas_user }}_{{ sar_email }}.tar.gz {{ sar_tar_output_path }}"
always: always:
# Let's clean up our temporary directory. # Let's clean up our temporary directory.
- command: "rm -r {{ sar_tmp_dir }}" - ansible.builtin.command: "rm -r {{ sar_tmp_dir }}"

View file

@ -6,7 +6,7 @@
register: pod_id register: pod_id
# Run the SAR script # Run the SAR script
- name: Run oc exec in container to extract the data - name: Run oc exec in container to extract the data
command: "oc -n {{ item.value.openshift_namespace }} rsh {{ pod_id.stdout }} bash -c 'SAR_USERNAME={{ sar_fas_user }} SAR_EMAIL={{ sar_email }} {{ item.value.sar_script }}'" ansible.builtin.command: "oc -n {{ item.value.openshift_namespace }} rsh {{ pod_id.stdout }} bash -c 'SAR_USERNAME={{ sar_fas_user }} SAR_EMAIL={{ sar_email }} {{ item.value.sar_script }}'"
register: sar_data register: sar_data
# Store the result on disk # Store the result on disk
- name: Copy the output data locally - name: Copy the output data locally

View file

@ -24,7 +24,7 @@
when: transaction_id.stderr == "" when: transaction_id.stderr == ""
- name: Get info on that transaction - name: Get info on that transaction
command: yum history info {{ transaction_id.stdout }} ansible.builtin.command: yum history info {{ transaction_id.stdout }}
register: transaction_info register: transaction_info
when: transaction_id.stderr == "" when: transaction_id.stderr == ""
@ -35,5 +35,5 @@
# when: transaction_id.stderr == "" # when: transaction_id.stderr == ""
- name: Okay.. undo that transaction now - name: Okay.. undo that transaction now
command: yum -y history undo {{ transaction_id.stdout }} ansible.builtin.command: yum -y history undo {{ transaction_id.stdout }}
when: transaction_id.stderr == "" when: transaction_id.stderr == ""

View file

@ -33,7 +33,7 @@
mode: "0755" mode: "0755"
- name: Run the import script - name: Run the import script
command: ansible.builtin.command:
argv: argv:
- /usr/local/bin/karma-to-cookies-db - /usr/local/bin/karma-to-cookies-db
- -i - -i

View file

@ -7,7 +7,7 @@
# - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml # - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks: tasks:
- name: Create backup of FreeIPA server data - name: Create backup of FreeIPA server data
command: ipa-backup ansible.builtin.command: ipa-backup
- name: Make the latest backup available under a fixed name - name: Make the latest backup available under a fixed name
shell: shell:

View file

@ -32,14 +32,14 @@
# Checks # Checks
- name: Check if the host can obtain a Kerberos ticket - name: Check if the host can obtain a Kerberos ticket
command: kinit -kt /etc/krb5.keytab ansible.builtin.command: kinit -kt /etc/krb5.keytab
ignore_errors: yes ignore_errors: yes
changed_when: no changed_when: no
register: kinit_res register: kinit_res
when: ipa_server is defined when: ipa_server is defined
- name: Ping the IPA server - name: Ping the IPA server
command: ipa ping ansible.builtin.command: ipa ping
ignore_errors: yes ignore_errors: yes
changed_when: no changed_when: no
register: ipa_ping_res register: ipa_ping_res
@ -56,7 +56,7 @@
# Do the things # Do the things
- name: Unenroll IPA client - name: Unenroll IPA client
command: ipa-client-install --uninstall --unattended ansible.builtin.command: ipa-client-install --uninstall --unattended
when: do_the_things when: do_the_things
- name: Apply the ipa/client role - name: Apply the ipa/client role

View file

@ -7,4 +7,4 @@
# - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml # - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks: tasks:
- name: Restore latest backup of FreeIPA server data - name: Restore latest backup of FreeIPA server data
command: ipa-restore /var/lib/ipa/backup/ipa-full-latest -p {{ ipa_admin_password }} ansible.builtin.command: ipa-restore /var/lib/ipa/backup/ipa-full-latest -p {{ ipa_admin_password }}

View file

@ -9,7 +9,7 @@
tasks: tasks:
- name: Uninstall IPA client - name: Uninstall IPA client
command: ipa-client-install --uninstall --unattended ansible.builtin.command: ipa-client-install --uninstall --unattended
ignore_errors: yes ignore_errors: yes
- import_playbook: "/srv/web/infra/ansible/playbooks/groups/bodhi-backend.yml" - import_playbook: "/srv/web/infra/ansible/playbooks/groups/bodhi-backend.yml"
@ -67,7 +67,7 @@
loop: "{{keytabs}}" loop: "{{keytabs}}"
- name: Remove keytab secret - name: Remove keytab secret
command: oc -n {{item.app}} delete secret {{item.secret_name}} ansible.builtin.command: oc -n {{item.app}} delete secret {{item.secret_name}}
register: delete_out register: delete_out
failed_when: "delete_out.rc != 0 and 'NotFound' not in delete_out.stderr" failed_when: "delete_out.rc != 0 and 'NotFound' not in delete_out.stderr"
changed_when: "delete_out.rc == 0 and 'secret \"{{item.secret_name}}\" deleted' in delete_out.stdout" changed_when: "delete_out.rc == 0 and 'secret \"{{item.secret_name}}\" deleted' in delete_out.stdout"

View file

@ -29,7 +29,7 @@
- debug: var=prod_output.stdout_lines - debug: var=prod_output.stdout_lines
- name: Run registry garbage collection to reclaim disk space - name: Run registry garbage collection to reclaim disk space
command: "registry garbage-collect /etc/docker-distribution/registry/config.yml" ansible.builtin.command: "registry garbage-collect /etc/docker-distribution/registry/config.yml"
when: env == "production" when: env == "production"
- name: Find and Delete 30 days old OCI images (stg) - name: Find and Delete 30 days old OCI images (stg)
@ -45,5 +45,5 @@
- debug: var=stg_output.stdout_lines - debug: var=stg_output.stdout_lines
- name: Run registry garbage collection to reclaim disk space (stg) - name: Run registry garbage collection to reclaim disk space (stg)
command: "registry garbage-collect /etc/docker-distribution/registry/config.yml" ansible.builtin.command: "registry garbage-collect /etc/docker-distribution/registry/config.yml"
when: env == "staging" when: env == "staging"

View file

@ -100,7 +100,7 @@
- kvm_deploy - kvm_deploy
when: inventory_hostname in groups['ocp_vms_stg'] or inventory_hostname in groups['ocp_vms'] when: inventory_hostname in groups['ocp_vms_stg'] or inventory_hostname in groups['ocp_vms']
- name: == OCP KVM provisioning == Deploying the OCP Virtual Guest[s] - name: == OCP KVM provisioning == Deploying the OCP Virtual Guest[s]
command: "{{ virt_install_command }}" ansible.builtin.command: "{{ virt_install_command }}"
delegate_to: "{{ vmhost }}" delegate_to: "{{ vmhost }}"
tags: tags:
- kvm_deploy - kvm_deploy

View file

@ -11,7 +11,7 @@
tasks: tasks:
- name: Run syncStatic (this takes a while)... - name: Run syncStatic (this takes a while)...
command: /usr/local/bin/lock-wrapper syncStatic /usr/local/bin/syncStatic ansible.builtin.command: /usr/local/bin/lock-wrapper syncStatic /usr/local/bin/syncStatic
- name: Tell the proxies to sync that freshness - name: Tell the proxies to sync that freshness
hosts: proxies:proxies_stg hosts: proxies:proxies_stg
@ -23,7 +23,7 @@
tasks: tasks:
- name: Rsync each site in to place - name: Rsync each site in to place
command: /usr/bin/rsync --delete -a --no-owner --no-group sundries01::{{item}}/ /srv/web/{{item}}/ ansible.builtin.command: /usr/bin/rsync --delete -a --no-owner --no-group sundries01::{{item}}/ /srv/web/{{item}}/
with_items: with_items:
- getfedora.org - getfedora.org
- fedoracommunity.org - fedoracommunity.org

View file

@ -52,7 +52,7 @@
- "{{ rpmdir }}/*.src.rpm" - "{{ rpmdir }}/*.src.rpm"
- name: Move processed srpms out to {{ rpmdir }}-old - name: Move processed srpms out to {{ rpmdir }}-old
command: /bin/mv {{ item }} {{ rpmdir }}-old/ ansible.builtin.command: /bin/mv {{ item }} {{ rpmdir }}-old/
when: not testing when: not testing
with_fileglob: with_fileglob:
- "{{ rpmdir }}/*.src.rpm" - "{{ rpmdir }}/*.src.rpm"
@ -68,13 +68,13 @@
- "{{ rpmdir }}/*.rpm" - "{{ rpmdir }}/*.rpm"
- name: Move processed rpms out to {{ rpmdir }}-old - name: Move processed rpms out to {{ rpmdir }}-old
command: /bin/mv {{ item }} {{ rpmdir }}-old/ ansible.builtin.command: /bin/mv {{ item }} {{ rpmdir }}-old/
when: not testing when: not testing
with_fileglob: with_fileglob:
- "{{ rpmdir }}/*.rpm" - "{{ rpmdir }}/*.rpm"
- name: Run createrepo on each repo - name: Run createrepo on each repo
command: createrepo --update {{ repodir }}/{{ item }}/ ansible.builtin.command: createrepo --update {{ repodir }}/{{ item }}/
with_items: with_items:
- SRPMS - SRPMS
- x86_64 - x86_64

View file

@ -20,9 +20,9 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks: tasks:
- command: oc -n bodhi scale dc/bodhi-web --replicas=0 - ansible.builtin.command: oc -n bodhi scale dc/bodhi-web --replicas=0
- command: oc -n bodhi scale dc/bodhi-consumer --replicas=0 - ansible.builtin.command: oc -n bodhi scale dc/bodhi-consumer --replicas=0
- command: oc -n bodhi scale dc/bodhi-celery --replicas=0 - ansible.builtin.command: oc -n bodhi scale dc/bodhi-celery --replicas=0
- name: Bring staging services down (messaging) - name: Bring staging services down (messaging)
hosts: bodhi_backend_stg hosts: bodhi_backend_stg
@ -60,10 +60,10 @@
src: /srv/web/infra/db-dumps/bodhi2.dump.xz src: /srv/web/infra/db-dumps/bodhi2.dump.xz
dest: /var/tmp/bodhi2.dump.xz dest: /var/tmp/bodhi2.dump.xz
owner: postgres group=postgres owner: postgres group=postgres
- command: unxz /var/tmp/bodhi2.dump.xz - ansible.builtin.command: unxz /var/tmp/bodhi2.dump.xz
creates=/var/tmp/bodhi2.dump creates=/var/tmp/bodhi2.dump
- command: dropdb bodhi2 - ansible.builtin.command: dropdb bodhi2
- command: createdb -O bodhi2 bodhi2 - ansible.builtin.command: createdb -O bodhi2 bodhi2
- name: Import the prod db. - name: Import the prod db.
shell: cat /var/tmp/bodhi2.dump | psql bodhi2 shell: cat /var/tmp/bodhi2.dump | psql bodhi2
- ansible.builtin.file: path=/var/tmp/bodhi2.dump state=absent - ansible.builtin.file: path=/var/tmp/bodhi2.dump state=absent
@ -77,9 +77,9 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks: tasks:
- command: oc -n bodhi scale dc/bodhi-web --replicas=1 - ansible.builtin.command: oc -n bodhi scale dc/bodhi-web --replicas=1
- command: oc -n bodhi scale dc/bodhi-consumer --replicas=1 - ansible.builtin.command: oc -n bodhi scale dc/bodhi-consumer --replicas=1
- command: oc -n bodhi scale dc/bodhi-celery --replicas=1 - ansible.builtin.command: oc -n bodhi scale dc/bodhi-celery --replicas=1
- name: Bring staging services up (httpd) - name: Bring staging services up (httpd)
hosts: bodhi2_stg hosts: bodhi2_stg

View file

@ -78,15 +78,15 @@
dest: /var/tmp/{{ db }}.dump.xz dest: /var/tmp/{{ db }}.dump.xz
- name: Unpack the archive - name: Unpack the archive
command: unxz /var/tmp/{{ db }}.dump.xz ansible.builtin.command: unxz /var/tmp/{{ db }}.dump.xz
creates=/var/tmp/{{ db }}.dump creates=/var/tmp/{{ db }}.dump
- name: Drop the postgresql database in staging - name: Drop the postgresql database in staging
command: dropdb {{ db }} ansible.builtin.command: dropdb {{ db }}
ignore_errors: yes ignore_errors: yes
- name: Create the postgresql database in staging - name: Create the postgresql database in staging
command: createdb {{ db }} ansible.builtin.command: createdb {{ db }}
- name: Import the prod db. This will take quite a while. Go get a snack! - name: Import the prod db. This will take quite a while. Go get a snack!
shell: cat /var/tmp/{{ db }}.dump | psql {{ db }} shell: cat /var/tmp/{{ db }}.dump | psql {{ db }}
@ -123,7 +123,7 @@
tasks: tasks:
- name: Remove the db dump on the prod server - name: Remove the db dump on the prod server
command: rm -f /var/tmp/{{ db }}.dump.xz ansible.builtin.command: rm -f /var/tmp/{{ db }}.dump.xz
- name: Remove the prod db dump on batcave - name: Remove the prod db dump on batcave
hosts: batcave01.iad2.fedoraproject.org hosts: batcave01.iad2.fedoraproject.org
@ -138,4 +138,4 @@
tasks: tasks:
- name: Remove the DB dump from batcave - name: Remove the DB dump from batcave
command: rm -f /var/tmp/{{ db }}.dump.xz ansible.builtin.command: rm -f /var/tmp/{{ db }}.dump.xz

View file

@ -40,12 +40,12 @@
dest: /var/tmp/mailman.dump.xz dest: /var/tmp/mailman.dump.xz
owner: postgres owner: postgres
group: postgres group: postgres
- command: unxz /var/tmp/mailman.dump.xz - ansible.builtin.command: unxz /var/tmp/mailman.dump.xz
creates=/var/tmp/mailman.dump creates=/var/tmp/mailman.dump
- command: dropdb mailman - ansible.builtin.command: dropdb mailman
- command: createdb -O mailmanadmin mailman - ansible.builtin.command: createdb -O mailmanadmin mailman
- name: Import the prod db. This will take quite a while. Go get a snack! - name: Import the prod db. This will take quite a while. Go get a snack!
command: psql -f /var/tmp/mailman.dump mailman ansible.builtin.command: psql -f /var/tmp/mailman.dump mailman
# - name: Fix the database # - name: Fix the database
# shell: psql -f /var/lib/pgsql/mailman-reset-staging.sql mailman # shell: psql -f /var/lib/pgsql/mailman-reset-staging.sql mailman
@ -55,12 +55,12 @@
dest: /var/tmp/hyperkitty.dump.xz dest: /var/tmp/hyperkitty.dump.xz
owner: postgres owner: postgres
group: postgres group: postgres
- command: unxz /var/tmp/hyperkitty.dump.xz - ansible.builtin.command: unxz /var/tmp/hyperkitty.dump.xz
creates=/var/tmp/hyperkitty.dump creates=/var/tmp/hyperkitty.dump
- command: dropdb hyperkitty - ansible.builtin.command: dropdb hyperkitty
- command: createdb -O hyperkittyadmin hyperkitty - ansible.builtin.command: createdb -O hyperkittyadmin hyperkitty
- name: Import the prod db. This will take quite a while. Go get a snack! - name: Import the prod db. This will take quite a while. Go get a snack!
command: psql -f /var/tmp/hyperkitty.dump hyperkitty ansible.builtin.command: psql -f /var/tmp/hyperkitty.dump hyperkitty
# - name: Fix the database # - name: Fix the database
# shell: psql -f /var/lib/pgsql/hyperkitty-reset-staging.sql hyperkitty # shell: psql -f /var/lib/pgsql/hyperkitty-reset-staging.sql hyperkitty
@ -91,4 +91,4 @@
- import_tasks: "{{ handlers_path }}/restart_services.yml" - import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks: tasks:
- command: /srv/webui/bin/prod-to-stg.py - ansible.builtin.command: /srv/webui/bin/prod-to-stg.py

View file

@ -76,7 +76,7 @@
# Dell updates here # Dell updates here
- name: Check Dell updates - name: Check Dell updates
check_mode: no check_mode: no
command: /root/firmware-upgrades/{{ item.item.1}} -qc ansible.builtin.command: /root/firmware-upgrades/{{ item.item.1}} -qc
register: check_results register: check_results
failed_when: "'System(s) supported by this package' in check_results.stdout" failed_when: "'System(s) supported by this package' in check_results.stdout"
changed_when: "'is the same' not in check_results.stdout" changed_when: "'is the same' not in check_results.stdout"
@ -84,7 +84,7 @@
with_items: "{{is_applied_results.results}}" with_items: "{{is_applied_results.results}}"
- name: Apply Dell updates - name: Apply Dell updates
command: /root/firmware-upgrades/{{ item.item.item.1}} -q ansible.builtin.command: /root/firmware-upgrades/{{ item.item.item.1}} -q
register: update_results register: update_results
failed_when: "'System(s) supported by this package:' in update_results.stdout" failed_when: "'System(s) supported by this package:' in update_results.stdout"
changed_when: "'should be restarted' in update_results.stdout or 'completed successfully' in update_results.stdout" changed_when: "'should be restarted' in update_results.stdout or 'completed successfully' in update_results.stdout"

View file

@ -25,7 +25,7 @@
when: testing and ansible_distribution_major_version|int < 8 and ansible_distribution == 'RedHat' when: testing and ansible_distribution_major_version|int < 8 and ansible_distribution == 'RedHat'
- name: Dnf clean all (since we can't do it when updating) - name: Dnf clean all (since we can't do it when updating)
command: dnf clean all ansible.builtin.command: dnf clean all
when: not testing and ansible_distribution_major_version|int > 21 and ansible_distribution == 'Fedora' when: not testing and ansible_distribution_major_version|int > 21 and ansible_distribution == 'Fedora'
- name: Dnf update {{ package }} from main repo - name: Dnf update {{ package }} from main repo
@ -33,7 +33,7 @@
when: not testing and ansible_distribution_major_version|int > 21 and ansible_distribution == 'Fedora' when: not testing and ansible_distribution_major_version|int > 21 and ansible_distribution == 'Fedora'
- name: Dnf clean all (since we can't do it when updating) - name: Dnf clean all (since we can't do it when updating)
command: dnf clean all --enablerepo=infrastructure-tags-stg ansible.builtin.command: dnf clean all --enablerepo=infrastructure-tags-stg
when: testing and ansible_distribution_major_version|int > 21 and ansible_distribution == 'Fedora' when: testing and ansible_distribution_major_version|int > 21 and ansible_distribution == 'Fedora'
- name: Dnf update {{ package }} from testing repo - name: Dnf update {{ package }} from testing repo

View file

@ -58,7 +58,7 @@
tasks: tasks:
- name: Find out what the current migration version is - name: Find out what the current migration version is
command: /usr/bin/alembic-3 -c /etc/bodhi/alembic.ini current ansible.builtin.command: /usr/bin/alembic-3 -c /etc/bodhi/alembic.ini current
register: current_migration_version register: current_migration_version
- name: Stop the front end if there are migrations to run - name: Stop the front end if there are migrations to run
@ -82,7 +82,7 @@
# This will be a bool that indicates whether we need to run migrations or not. # This will be a bool that indicates whether we need to run migrations or not.
migrations: "'(head)' not in hostvars['bodhi-backend01{{ env_suffix }}.iad2.fedoraproject.org']['current_migration_version'].stdout" migrations: "'(head)' not in hostvars['bodhi-backend01{{ env_suffix }}.iad2.fedoraproject.org']['current_migration_version'].stdout"
- name: Scale down to 0 pods - name: Scale down to 0 pods
command: oc -n bodhi scale dc/bodhi-web --replicas=0 ansible.builtin.command: oc -n bodhi scale dc/bodhi-web --replicas=0
when: migrations when: migrations
- name: Verify the backends, stop them, and then upgrade the db - name: Verify the backends, stop them, and then upgrade the db
@ -114,7 +114,7 @@
- bodhi-celery - bodhi-celery
- name: Upgrade the database - name: Upgrade the database
command: /usr/bin/alembic-3 -c /etc/bodhi/alembic.ini upgrade head ansible.builtin.command: /usr/bin/alembic-3 -c /etc/bodhi/alembic.ini upgrade head
args: args:
chdir: /usr/share/bodhi/ chdir: /usr/share/bodhi/
@ -145,10 +145,10 @@
tasks: tasks:
- include_vars: /srv/web/infra/ansible/vars/apps/bodhi.yml - include_vars: /srv/web/infra/ansible/vars/apps/bodhi.yml
- name: Scale up pods - name: Scale up pods
command: oc -n bodhi scale dc/bodhi-web --replicas={{ bodhi_openshift_pods }} ansible.builtin.command: oc -n bodhi scale dc/bodhi-web --replicas={{ bodhi_openshift_pods }}
when: env != "staging" when: env != "staging"
- name: Scale up pods - name: Scale up pods
command: oc -n bodhi scale dc/bodhi-web --replicas={{ bodhi_openshift_pods }} ansible.builtin.command: oc -n bodhi scale dc/bodhi-web --replicas={{ bodhi_openshift_pods }}
when: env == "staging" when: env == "staging"
# Redeploy the build config as it may request a newer version in the Dockerfile # Redeploy the build config as it may request a newer version in the Dockerfile
# Only do it on prod because staging tracks a branch # Only do it on prod because staging tracks a branch

View file

@ -13,7 +13,7 @@
tasks: tasks:
- name: Clean all metadata {%if testing%}(with infrastructure-testing on){%endif%} - name: Clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%} ansible.builtin.command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
check_mode: no check_mode: no
- name: Update bugzilla2fedmsg packages from main repo - name: Update bugzilla2fedmsg packages from main repo
package: name="python-bugzilla2fedmsg" state=latest package: name="python-bugzilla2fedmsg" state=latest

View file

@ -13,7 +13,7 @@
tasks: tasks:
- name: Clean all metadata {%if testing%}(with infrastructure-testing on){%endif%} - name: Clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%} ansible.builtin.command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
check_mode: no check_mode: no
- name: Yum update datagrepper packages from main repo - name: Yum update datagrepper packages from main repo
package: name="datagrepper" state=latest package: name="datagrepper" state=latest

View file

@ -33,7 +33,7 @@
- import_tasks: "{{ handlers_path }}/restart_services.yml" - import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks: tasks:
- name: Scale down datagrepper to 0 pods - name: Scale down datagrepper to 0 pods
command: oc -n datagrepper scale dc/datagrepper --replicas=0 ansible.builtin.command: oc -n datagrepper scale dc/datagrepper --replicas=0
- name: Stop datanommer - name: Stop datanommer
hosts: hosts:
@ -48,7 +48,7 @@
- import_tasks: "{{ handlers_path }}/restart_services.yml" - import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks: tasks:
- name: Scale down datanommer to 0 pods - name: Scale down datanommer to 0 pods
command: oc -n datanommer scale dc/datanommer --replicas=0 ansible.builtin.command: oc -n datanommer scale dc/datanommer --replicas=0
- name: Upgrade the database - name: Upgrade the database
role: openshift/object role: openshift/object
@ -57,7 +57,7 @@
object_objectname: job.yml object_objectname: job.yml
- name: Wait for the db-upgrade completion - name: Wait for the db-upgrade completion
command: oc get jobs/db-upgrade -o jsonpath='{@.status.succeeded}' ansible.builtin.command: oc get jobs/db-upgrade -o jsonpath='{@.status.succeeded}'
register: status register: status
until: status.stdout | int == 1 until: status.stdout | int == 1
retries: 5 retries: 5
@ -81,7 +81,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks: tasks:
- name: Scale up datanommer pods - name: Scale up datanommer pods
command: oc -n datanommer scale dc/db-datanommer --replicas=1 ansible.builtin.command: oc -n datanommer scale dc/db-datanommer --replicas=1
- name: Start the datagrepper again - name: Start the datagrepper again
hosts: hosts:
@ -94,7 +94,7 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks: tasks:
- name: Scale up datagrepper pods - name: Scale up datagrepper pods
command: oc -n datagrepper scale dc/datagrepper --replicas=1 ansible.builtin.command: oc -n datagrepper scale dc/datagrepper --replicas=1
- name: Restart the last backend piece (badges) - name: Restart the last backend piece (badges)
hosts: hosts:

View file

@ -35,7 +35,7 @@
tasks: tasks:
- name: Clean all metadata {%if testing%}(with infrastructure-testing on){%endif%} - name: Clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%} ansible.builtin.command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
check_mode: no check_mode: no
- name: Yum update fedmsg packages from the main repo - name: Yum update fedmsg packages from the main repo
package: name={{item}} state=latest package: name={{item}} state=latest

View file

@ -13,7 +13,7 @@
tasks: tasks:
- name: Clean all metadata {%if testing%}(with infrastructure-testing on){%endif%} - name: Clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%} ansible.builtin.command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
check_mode: no check_mode: no
- name: Update mote packages from main repo - name: Update mote packages from main repo
package: name="mote" state=latest package: name="mote" state=latest

View file

@ -13,7 +13,7 @@
tasks: tasks:
- name: Clean all metadata {%if testing%}(with infrastructure-testing on){%endif%} - name: Clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
command: dnf clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%} ansible.builtin.command: dnf clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
check_mode: no check_mode: no
- name: Update fedora-packages packages from main repo - name: Update fedora-packages packages from main repo
package: name="fedora-packages" state=latest package: name="fedora-packages" state=latest

View file

@ -75,7 +75,7 @@
when: inventory_hostname.startswith('pagure') when: inventory_hostname.startswith('pagure')
- name: Upgrade the database - name: Upgrade the database
command: /usr/bin/alembic -c /etc/pagure/alembic.ini upgrade head ansible.builtin.command: /usr/bin/alembic -c /etc/pagure/alembic.ini upgrade head
args: args:
chdir: /etc/pagure/ chdir: /etc/pagure/
environment: environment:

View file

@ -7,10 +7,10 @@
tasks: tasks:
- name: Check for rkhunter - name: Check for rkhunter
command: /usr/bin/test -f /usr/bin/rkhunter ansible.builtin.command: /usr/bin/test -f /usr/bin/rkhunter
register: rkhunter register: rkhunter
ignore_errors: true ignore_errors: true
- name: Run rkhunter --propupd - name: Run rkhunter --propupd
command: /usr/bin/rkhunter --propupd ansible.builtin.command: /usr/bin/rkhunter --propupd
when: rkhunter is success when: rkhunter is success

View file

@ -7,18 +7,18 @@
tasks: tasks:
- name: Expire-caches - name: Expire-caches
command: yum clean expire-cache ansible.builtin.command: yum clean expire-cache
- name: Yum -y {{ yumcommand }} - name: Yum -y {{ yumcommand }}
command: yum -y {{ yumcommand }} ansible.builtin.command: yum -y {{ yumcommand }}
async: 7200 async: 7200
poll: 15 poll: 15
- name: Check for rkhunter - name: Check for rkhunter
command: /usr/bin/test -f /usr/bin/rkhunter ansible.builtin.command: /usr/bin/test -f /usr/bin/rkhunter
register: rkhunter register: rkhunter
ignore_errors: true ignore_errors: true
- name: Run rkhunter --propupd - name: Run rkhunter --propupd
command: /usr/bin/rkhunter --propupd ansible.builtin.command: /usr/bin/rkhunter --propupd
when: rkhunter is success when: rkhunter is success

View file

@ -57,10 +57,10 @@
tasks: tasks:
- name: Check for rkhunter - name: Check for rkhunter
command: /usr/bin/test -f /usr/bin/rkhunter ansible.builtin.command: /usr/bin/test -f /usr/bin/rkhunter
register: rkhunter register: rkhunter
ignore_errors: true ignore_errors: true
- name: Run rkhunter --propupd - name: Run rkhunter --propupd
command: /usr/bin/rkhunter --propupd ansible.builtin.command: /usr/bin/rkhunter --propupd
when: rkhunter is success when: rkhunter is success

View file

@ -55,7 +55,7 @@
when: nodns is not defined or not "true" in nodns when: nodns is not defined or not "true" in nodns
- name: Run update-dns on each nameserver - name: Run update-dns on each nameserver
command: /usr/local/bin/update-dns ansible.builtin.command: /usr/local/bin/update-dns
delegate_to: "{{item}}" delegate_to: "{{item}}"
with_items: "{{groups.dns}}" with_items: "{{groups.dns}}"
when: nodns is not defined or not "true" in nodns when: nodns is not defined or not "true" in nodns

View file

@ -6,4 +6,4 @@
tasks: tasks:
- name: Push dns changes out - name: Push dns changes out
command: /usr/local/bin/update-dns ansible.builtin.command: /usr/local/bin/update-dns

View file

@ -13,10 +13,10 @@
tasks: tasks:
- name: create new production ticket key - name: create new production ticket key
command: /usr/local/bin/generate_ticketkey /root/ticketkey_production.tkey fpprod ansible.builtin.command: /usr/local/bin/generate_ticketkey /root/ticketkey_production.tkey fpprod
- name: create new staging ticket key - name: create new staging ticket key
command: /usr/local/bin/generate_ticketkey /root/ticketkey_staging.tkey fpstag ansible.builtin.command: /usr/local/bin/generate_ticketkey /root/ticketkey_staging.tkey fpstag
- name: Push out new ticket key - name: Push out new ticket key
hosts: proxies:proxies_stg hosts: proxies:proxies_stg

View file

@ -45,7 +45,7 @@
delegate_to: noc01.iad2.fedoraproject.org delegate_to: noc01.iad2.fedoraproject.org
- name: Echo-y - name: Echo-y
command: /sbin/halt -p ansible.builtin.command: /sbin/halt -p
ignore_errors: true ignore_errors: true
# if one of them is down we don't care # if one of them is down we don't care

View file

@ -41,7 +41,7 @@
tasks: tasks:
- name: Halt the vm instances - to poweroff - name: Halt the vm instances - to poweroff
command: /sbin/shutdown -h 1 ansible.builtin.command: /sbin/shutdown -h 1
ignore_errors: true ignore_errors: true
# if one of them is down we don't care # if one of them is down we don't care
@ -61,4 +61,4 @@
tasks: tasks:
- name: Halt the virthost - name: Halt the virthost
command: /sbin/shutdown -h 1 ansible.builtin.command: /sbin/shutdown -h 1

View file

@ -105,7 +105,7 @@
with_items: "{{ newvmlist.list_vms }}" with_items: "{{ newvmlist.list_vms }}"
# - name: sync time # - name: sync time
# command: ntpdate -u 1.rhel.pool.ntp.org # ansible.builtin.command: ntpdate -u 1.rhel.pool.ntp.org
- name: tell nagios to unshush - name: tell nagios to unshush
nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }} nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }}

View file

@ -83,10 +83,10 @@
tasks: tasks:
- name: Check for rkhunter - name: Check for rkhunter
command: /usr/bin/test -f /usr/bin/rkhunter ansible.builtin.command: /usr/bin/test -f /usr/bin/rkhunter
register: rkhunter register: rkhunter
ignore_errors: true ignore_errors: true
- name: Run rkhunter --propupd - name: Run rkhunter --propupd
command: /usr/bin/rkhunter --propupd ansible.builtin.command: /usr/bin/rkhunter --propupd
when: rkhunter is success when: rkhunter is success

View file

@ -11,7 +11,7 @@
- name: Assign repositories to Fedora releases - name: Assign repositories to Fedora releases
loop: "{{ faf_repos }}" loop: "{{ faf_repos }}"
command: "faf repoassign '{{ item.name }}' '{{ item.opsys }}' '{{ item.arch }}'" ansible.builtin.command: "faf repoassign '{{ item.name }}' '{{ item.opsys }}' '{{ item.arch }}'"
become: yes become: yes
become_user: faf become_user: faf
tags: add_repo tags: add_repo
@ -26,14 +26,14 @@
- name: Remove repositories of EOL Fedora releases - name: Remove repositories of EOL Fedora releases
loop: "{{ eol_repolist.results | map(attribute='stdout_lines') | flatten }}" loop: "{{ eol_repolist.results | map(attribute='stdout_lines') | flatten }}"
command: "faf repodel '{{ item }}'" ansible.builtin.command: "faf repodel '{{ item }}'"
become: yes become: yes
become_user: faf become_user: faf
ignore_errors: yes ignore_errors: yes
- name: Clean up packages from EOL Fedora releases - name: Clean up packages from EOL Fedora releases
loop: "{{ rs_internal_fedora_vers_removed }}" loop: "{{ rs_internal_fedora_vers_removed }}"
command: "faf cleanup-packages Fedora '{{ item }}'" ansible.builtin.command: "faf cleanup-packages Fedora '{{ item }}'"
become: yes become: yes
become_user: faf become_user: faf
ignore_errors: yes ignore_errors: yes

View file

@ -1,6 +1,6 @@
--- ---
- name: Ensure PostgreSQL database is initialized. - name: Ensure PostgreSQL database is initialized.
command: "postgresql-setup --initdb --unit postgresql" ansible.builtin.command: "postgresql-setup --initdb --unit postgresql"
args: args:
creates: "/var/lib/pgsql/data/PG_VERSION" creates: "/var/lib/pgsql/data/PG_VERSION"

View file

@ -3,13 +3,13 @@
# check backend functionality # check backend functionality
- name: Add dummy Fedora 42 release - name: Add dummy Fedora 42 release
command: faf releaseadd -o fedora --opsys-release 42 ansible.builtin.command: faf releaseadd -o fedora --opsys-release 42
become: yes become: yes
become_user: faf become_user: faf
changed_when: false changed_when: false
- name: Get releases from FAF - name: Get releases from FAF
command: faf releaselist ansible.builtin.command: faf releaselist
become: yes become: yes
become_user: faf become_user: faf
register: release_list register: release_list
@ -17,7 +17,7 @@
changed_when: false changed_when: false
- name: Add dummy meta_faf component to Fedora 42 release - name: Add dummy meta_faf component to Fedora 42 release
command: faf compadd -o fedora --opsys-release 42 meta_faf ansible.builtin.command: faf compadd -o fedora --opsys-release 42 meta_faf
become: yes become: yes
become_user: faf become_user: faf
changed_when: false changed_when: false
@ -30,7 +30,7 @@
group: faf group: faf
- name: Faf - name: Faf
command: faf {{ item }} ansible.builtin.command: faf {{ item }}
become: yes become: yes
become_user: faf become_user: faf
loop: loop:

View file

@ -1,6 +1,6 @@
--- ---
- name: Remove EOLed opsys - name: Remove EOLed opsys
command: faf releasemod -o "{{ item.opsys | lower }}" --opsys-release "{{ item.release }}" -s EOL ansible.builtin.command: faf releasemod -o "{{ item.opsys | lower }}" --opsys-release "{{ item.release }}" -s EOL
loop: "{{ eol_opsys }}" loop: "{{ eol_opsys }}"
become: yes become: yes
become_user: faf become_user: faf
@ -8,7 +8,7 @@
changed_when: false changed_when: false
- name: Remove EOLed packages - name: Remove EOLed packages
command: faf cleanup-packages "{{ item.opsys }}" "{{ item.release }}" ansible.builtin.command: faf cleanup-packages "{{ item.opsys }}" "{{ item.release }}"
loop: "{{ eol_opsys }}" loop: "{{ eol_opsys }}"
become: yes become: yes
become_user: faf become_user: faf
@ -16,7 +16,7 @@
changed_when: false changed_when: false
- name: Remove unassigned packages - name: Remove unassigned packages
command: faf cleanup-unassigned -f ansible.builtin.command: faf cleanup-unassigned -f
become: yes become: yes
become_user: faf become_user: faf
failed_when: false failed_when: false

View file

@ -11,17 +11,17 @@
# Skip whole block if faf owns atleast 1 table in db # Skip whole block if faf owns atleast 1 table in db
- block: - block:
- name: Create faf's database schema - name: Create faf's database schema
command: faf-migrate-db --create-all ansible.builtin.command: faf-migrate-db --create-all
become: yes become: yes
become_user: faf become_user: faf
- name: Stamp database as migrated to latest version - name: Stamp database as migrated to latest version
command: faf-migrate-db --stamp-only ansible.builtin.command: faf-migrate-db --stamp-only
become: yes become: yes
become_user: faf become_user: faf
- name: Init faf - name: Init faf
command: faf init ansible.builtin.command: faf init
become: yes become: yes
become_user: faf become_user: faf
when: ( count_tables.stdout_lines[2]|int ) == 0 when: ( count_tables.stdout_lines[2]|int ) == 0

View file

@ -1,6 +1,6 @@
--- ---
- name: Run database migrations - name: Run database migrations
command: faf-migrate-db ansible.builtin.command: faf-migrate-db
become: yes become: yes
become_user: faf become_user: faf
changed_when: false changed_when: false

View file

@ -10,7 +10,7 @@
state: stopped state: stopped
- name: Check if subuid is set for retrace user - name: Check if subuid is set for retrace user
command: cat /etc/subuid ansible.builtin.command: cat /etc/subuid
changed_when: false changed_when: false
register: retrace_subuid register: retrace_subuid
@ -30,12 +30,12 @@
rs_subuid_max: "{{ t_subuid.stdout | default(100000) | int + 2 * 65536 - 1 }}" rs_subuid_max: "{{ t_subuid.stdout | default(100000) | int + 2 * 65536 - 1 }}"
- name: Set subuid for retrace user. - name: Set subuid for retrace user.
command: usermod retrace --add-subuids "{{ rs_subuid_min }}-{{ rs_subuid_max }}" ansible.builtin.command: usermod retrace --add-subuids "{{ rs_subuid_min }}-{{ rs_subuid_max }}"
when: '"retrace" not in retrace_subuid.stdout' when: '"retrace" not in retrace_subuid.stdout'
- name: Check if subgid is set for retrace user - name: Check if subgid is set for retrace user
command: cat /etc/subgid ansible.builtin.command: cat /etc/subgid
changed_when: false changed_when: false
register: retrace_subgid register: retrace_subgid
@ -55,7 +55,7 @@
rs_subgid_max: "{{ t_subgid.stdout | default(100000) | int + 2 * 65536 - 1 }}" rs_subgid_max: "{{ t_subgid.stdout | default(100000) | int + 2 * 65536 - 1 }}"
- name: Set subgid for retrace user - name: Set subgid for retrace user
command: usermod retrace --add-subgids "{{ rs_subgid_min }}-{{ rs_subgid_max }}" ansible.builtin.command: usermod retrace --add-subgids "{{ rs_subgid_min }}-{{ rs_subgid_max }}"
when: '"retrace" not in retrace_subgid.stdout' when: '"retrace" not in retrace_subgid.stdout'

View file

@ -1,6 +1,6 @@
--- ---
- name: Check if faf is installed - name: Check if faf is installed
command: rpm -q faf ansible.builtin.command: rpm -q faf
changed_when: false changed_when: false
- name: Add user retrace to faf db - name: Add user retrace to faf db

View file

@ -30,6 +30,6 @@
- ansible-server - ansible-server
- name: Install required collections - name: Install required collections
command: ansible-galaxy install -r {{ ansible_base }}/ansible/roles/ansible-server/files/requirements.yml ansible.builtin.command: ansible-galaxy install -r {{ ansible_base }}/ansible/roles/ansible-server/files/requirements.yml
tags: tags:
- ansible-server - ansible-server

View file

@ -1,3 +1,3 @@
--- ---
- name: Restart apache - name: Restart apache
command: /usr/local/bin/conditional-restart.sh httpd httpd ansible.builtin.command: /usr/local/bin/conditional-restart.sh httpd httpd

View file

@ -1,6 +1,6 @@
--- ---
- name: Apply interface-changes - name: Apply interface-changes
command: nmcli con up {{ item.split()[1] }} ansible.builtin.command: nmcli con up {{ item.split()[1] }}
async: 1 async: 1
poll: 0 poll: 0
with_items: with_items:
@ -16,7 +16,7 @@
service: name=NetworkManager state=restarted service: name=NetworkManager state=restarted
- name: Reload NetworkManager-connections - name: Reload NetworkManager-connections
command: nmcli c reload ansible.builtin.command: nmcli c reload
- name: Restart postfix - name: Restart postfix
service: name=postfix state=restarted service: name=postfix state=restarted

View file

@ -1,6 +1,6 @@
--- ---
- name: Check current crypto-policy - name: Check current crypto-policy
command: "update-crypto-policies --show" ansible.builtin.command: "update-crypto-policies --show"
register: currentcryptopolicy register: currentcryptopolicy
failed_when: "1 != 1" failed_when: "1 != 1"
changed_when: "1 != 1" changed_when: "1 != 1"
@ -10,7 +10,7 @@
- base/crypto-policies - base/crypto-policies
- name: Check if policy is applied - name: Check if policy is applied
command: "update-crypto-policies --is-applied" ansible.builtin.command: "update-crypto-policies --is-applied"
register: cryptopolicyapplied register: cryptopolicyapplied
failed_when: "1 != 1" failed_when: "1 != 1"
changed_when: "1 != 1" changed_when: "1 != 1"
@ -20,7 +20,7 @@
- base/crypto-policies - base/crypto-policies
- name: Set crypto-policy on fedora 33 and higher hosts back to default - name: Set crypto-policy on fedora 33 and higher hosts back to default
command: "update-crypto-policies --set DEFAULT" ansible.builtin.command: "update-crypto-policies --set DEFAULT"
when: "ansible_distribution_major_version|int >= 33 and (currentcryptopolicy.stdout.find('DEFAULT') == -1 or cryptopolicyapplied.rc != 0) and not inventory_hostname.startswith('ipsilon') " when: "ansible_distribution_major_version|int >= 33 and (currentcryptopolicy.stdout.find('DEFAULT') == -1 or cryptopolicyapplied.rc != 0) and not inventory_hostname.startswith('ipsilon') "
check_mode: no check_mode: no
tags: tags:
@ -28,7 +28,7 @@
- base/crypto-policies - base/crypto-policies
- name: Set crypto-policy on RHEL9 dns servers to DEFAULT:SHA1 - name: Set crypto-policy on RHEL9 dns servers to DEFAULT:SHA1
command: "update-crypto-policies --set DEFAULT:SHA1" ansible.builtin.command: "update-crypto-policies --set DEFAULT:SHA1"
when: "inventory_hostname.startswith('ns') and (currentcryptopolicy.stdout.find('DEFAULT:SHA1') == -1 or cryptopolicyapplied.rc != 0)" when: "inventory_hostname.startswith('ns') and (currentcryptopolicy.stdout.find('DEFAULT:SHA1') == -1 or cryptopolicyapplied.rc != 0)"
check_mode: no check_mode: no
tags: tags:

View file

@ -19,7 +19,7 @@
- name: Create host entry - name: Create host entry
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: ipa host-add --force {{inventory_hostname}} ansible.builtin.command: ipa host-add --force {{inventory_hostname}}
register: host_add_result register: host_add_result
changed_when: "'Added host' in host_add_result.stdout" changed_when: "'Added host' in host_add_result.stdout"
failed_when: "not ('Added host' in host_add_result.stdout or 'already exists' in host_add_result.stderr)" failed_when: "not ('Added host' in host_add_result.stdout or 'already exists' in host_add_result.stderr)"
@ -31,7 +31,7 @@
- name: Create additional host entries - name: Create additional host entries
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: ipa host-add --force {{item}} ansible.builtin.command: ipa host-add --force {{item}}
with_items: "{{ additional_host_keytabs }}" with_items: "{{ additional_host_keytabs }}"
register: hosts_add_result register: hosts_add_result
changed_when: "'Added host' in hosts_add_result.stdout" changed_when: "'Added host' in hosts_add_result.stdout"
@ -44,7 +44,7 @@
- name: Generate host keytab - name: Generate host keytab
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: ipa-getkeytab -s {{ipa_server}} -p host/{{inventory_hostname}} -k /tmp/{{inventory_hostname}}.kt ansible.builtin.command: ipa-getkeytab -s {{ipa_server}} -p host/{{inventory_hostname}} -k /tmp/{{inventory_hostname}}.kt
register: getkeytab_result register: getkeytab_result
changed_when: false changed_when: false
failed_when: "'successfully retrieved' not in getkeytab_result.stderr" failed_when: "'successfully retrieved' not in getkeytab_result.stderr"
@ -56,7 +56,7 @@
- name: Add additional host keytabs - name: Add additional host keytabs
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: ipa-getkeytab -s {{ipa_server}} -p host/{{item}} -k /tmp/{{inventory_hostname}}.kt ansible.builtin.command: ipa-getkeytab -s {{ipa_server}} -p host/{{item}} -k /tmp/{{inventory_hostname}}.kt
with_items: "{{ additional_host_keytabs }}" with_items: "{{ additional_host_keytabs }}"
register: getkeytabs_result register: getkeytabs_result
changed_when: false changed_when: false
@ -69,7 +69,7 @@
- name: Destroy kerberos ticket - name: Destroy kerberos ticket
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: kdestroy -A ansible.builtin.command: kdestroy -A
tags: tags:
- base - base
- config - config
@ -78,7 +78,7 @@
- name: Get keytab - name: Get keytab
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: base64 /tmp/{{inventory_hostname}}.kt ansible.builtin.command: base64 /tmp/{{inventory_hostname}}.kt
register: keytab register: keytab
tags: tags:
- base - base

View file

@ -372,7 +372,7 @@
- rsyslog-audit - rsyslog-audit
- name: Install our custom selinux module - name: Install our custom selinux module
command: semodule -i /usr/local/share/rsyslog/rsyslog-audit.pp ansible.builtin.command: semodule -i /usr/local/share/rsyslog/rsyslog-audit.pp
when: selinux_module is changed and ansible_distribution_major_version|int > 6 when: selinux_module is changed and ansible_distribution_major_version|int > 6
tags: tags:
- rsyslogd - rsyslogd
@ -398,7 +398,7 @@
- selinux - selinux
- name: Install our custom selinux module - name: Install our custom selinux module
command: semodule -i /usr/local/share/mapchkpwd.pp ansible.builtin.command: semodule -i /usr/local/share/mapchkpwd.pp
when: selinux_module is changed when: selinux_module is changed
tags: tags:
- selinux - selinux

View file

@ -60,7 +60,7 @@
- base - base
- name: Allow alternate sshd port - name: Allow alternate sshd port
command: semanage port -a -t ssh_port_t -p tcp {{ sshd_port }} ansible.builtin.command: semanage port -a -t ssh_port_t -p tcp {{ sshd_port }}
when: sshd_port in sshd_selinux_port when: sshd_port in sshd_selinux_port
failed_when: false failed_when: false
tags: tags:

View file

@ -425,7 +425,7 @@
# #
- name: Check the selinux context of webdir - name: Check the selinux context of webdir
command: matchpathcon /srv/web ansible.builtin.command: matchpathcon /srv/web
register: webdir register: webdir
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -437,7 +437,7 @@
- httpd/website - httpd/website
- name: /srv/web file contexts - name: /srv/web file contexts
command: semanage fcontext -a -t httpd_sys_content_t "/srv/web(/.*)?" ansible.builtin.command: semanage fcontext -a -t httpd_sys_content_t "/srv/web(/.*)?"
when: webdir.stdout.find('httpd_sys_content_t') == -1 when: webdir.stdout.find('httpd_sys_content_t') == -1
tags: tags:
- config - config
@ -451,7 +451,7 @@
# #
- name: Check the selinux context of ansible - name: Check the selinux context of ansible
command: matchpathcon /srv/git/ansible.git ansible.builtin.command: matchpathcon /srv/git/ansible.git
register: webdir register: webdir
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -463,7 +463,7 @@
- httpd/website - httpd/website
- name: /srv/git/ansible file contexts - name: /srv/git/ansible file contexts
command: semanage fcontext -a -t git_content_t "/srv/git/ansible.git(/.*)?" ansible.builtin.command: semanage fcontext -a -t git_content_t "/srv/git/ansible.git(/.*)?"
when: webdir.stdout.find('git_content_t') == -1 when: webdir.stdout.find('git_content_t') == -1
tags: tags:
- config - config
@ -473,7 +473,7 @@
- httpd/website - httpd/website
- name: Check the selinux context of badges - name: Check the selinux context of badges
command: matchpathcon /srv/git/badges ansible.builtin.command: matchpathcon /srv/git/badges
register: webdir register: webdir
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -485,7 +485,7 @@
- httpd/website - httpd/website
- name: /srv/git/badges file contexts - name: /srv/git/badges file contexts
command: semanage fcontext -a -t git_content_t "/srv/git/badges(/.*)?" ansible.builtin.command: semanage fcontext -a -t git_content_t "/srv/git/badges(/.*)?"
when: webdir.stdout.find('git_content_t') == -1 when: webdir.stdout.find('git_content_t') == -1
tags: tags:
- config - config
@ -495,7 +495,7 @@
- httpd/website - httpd/website
- name: Check the selinux context of dns - name: Check the selinux context of dns
command: matchpathcon /srv/git/dns ansible.builtin.command: matchpathcon /srv/git/dns
register: webdir register: webdir
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -507,7 +507,7 @@
- httpd/website - httpd/website
- name: /srv/git/dns file contexts - name: /srv/git/dns file contexts
command: semanage fcontext -a -t git_content_t "/srv/git/dns(/.*)?" ansible.builtin.command: semanage fcontext -a -t git_content_t "/srv/git/dns(/.*)?"
when: webdir.stdout.find('git_content_t') == -1 when: webdir.stdout.find('git_content_t') == -1
tags: tags:
- config - config
@ -517,7 +517,7 @@
- httpd/website - httpd/website
- name: Check the selinux context of infra-docs - name: Check the selinux context of infra-docs
command: matchpathcon /srv/git/infra-docs ansible.builtin.command: matchpathcon /srv/git/infra-docs
register: webdir register: webdir
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -529,7 +529,7 @@
- httpd/website - httpd/website
- name: /srv/git/infra-docs file contexts - name: /srv/git/infra-docs file contexts
command: semanage fcontext -a -t git_content_t "/srv/git/infra-docs(/.*)?" ansible.builtin.command: semanage fcontext -a -t git_content_t "/srv/git/infra-docs(/.*)?"
when: webdir.stdout.find('git_content_t') == -1 when: webdir.stdout.find('git_content_t') == -1
tags: tags:
- config - config
@ -584,7 +584,7 @@
- tmux - tmux
- name: Let the /var/tmux folder be writable to fi-apprentice as well - name: Let the /var/tmux folder be writable to fi-apprentice as well
command: setfacl -R -m d:g:fi-apprentice:rwx -m g:fi-apprentice:rwx /var/tmux ansible.builtin.command: setfacl -R -m d:g:fi-apprentice:rwx -m g:fi-apprentice:rwx /var/tmux
tags: tags:
- batcave - batcave
- tmux - tmux
@ -599,7 +599,7 @@
- openshiftboot - openshiftboot
- name: Let the openshift dir be writeable by sysadmin-openshift - name: Let the openshift dir be writeable by sysadmin-openshift
command: setfacl -R -m d:g:sysadmin-openshift:rwx -m g:sysadmin-openshift:rwx /srv/web/infra/bigfiles/{{item}} ansible.builtin.command: setfacl -R -m d:g:sysadmin-openshift:rwx -m g:sysadmin-openshift:rwx /srv/web/infra/bigfiles/{{item}}
with_items: with_items:
- openshiftboot - openshiftboot
- tftpboot/rhcos - tftpboot/rhcos

View file

@ -125,7 +125,7 @@
- cron - cron
- name: Determine Python version - name: Determine Python version
command: ansible.builtin.command:
argv: argv:
- python3 - python3
- -c - -c
@ -376,7 +376,7 @@
- bodhi - bodhi
- name: Let the ftpsync user also read the fedora-messaging key - name: Let the ftpsync user also read the fedora-messaging key
command: /usr/bin/setfacl -m user:ftpsync:rx /etc/pki/fedora-messaging/bodhi-key.pem ansible.builtin.command: /usr/bin/setfacl -m user:ftpsync:rx /etc/pki/fedora-messaging/bodhi-key.pem
tags: tags:
- config - config
- bodhi - bodhi

View file

@ -50,7 +50,7 @@
tags: cgit tags: cgit
- name: Check the selinux context of the repo list - name: Check the selinux context of the repo list
command: matchpathcon /srv/git/pkgs-git-repos-list ansible.builtin.command: matchpathcon /srv/git/pkgs-git-repos-list
register: gitlistcontext register: gitlistcontext
check_mode: no check_mode: no
changed_when: false changed_when: false
@ -60,7 +60,7 @@
- selinux - selinux
- name: Set the SELinux policy for the repo list - name: Set the SELinux policy for the repo list
command: semanage fcontext -a -t git_content_t "/srv/git/pkgs-git-repos-list" ansible.builtin.command: semanage fcontext -a -t git_content_t "/srv/git/pkgs-git-repos-list"
when: gitlistcontext.stdout.find('git_content_t') == -1 when: gitlistcontext.stdout.find('git_content_t') == -1
tags: tags:
- config - config

View file

@ -1,6 +1,6 @@
# Restart handler for our fedora-messaging consumer # Restart handler for our fedora-messaging consumer
--- ---
- name: Conditionally restart check-compose consumer service - name: Conditionally restart check-compose consumer service
command: /usr/local/bin/conditional-restart.sh fm-consumer@check-compose ansible.builtin.command: /usr/local/bin/conditional-restart.sh fm-consumer@check-compose
listen: listen:
- restart check-compose - restart check-compose

View file

@ -124,14 +124,14 @@
register: gitcc register: gitcc
- name: Check if check-compose is installed for current Python - name: Check if check-compose is installed for current Python
command: "pip show check_compose" ansible.builtin.command: "pip show check_compose"
register: instcc register: instcc
changed_when: "1 != 1" changed_when: "1 != 1"
failed_when: "1 != 1" failed_when: "1 != 1"
check_mode: no check_mode: no
- name: Install check-compose - name: Install check-compose
command: "python3 -m pip install --no-deps /root/check-compose" ansible.builtin.command: "python3 -m pip install --no-deps /root/check-compose"
when: "gitcc is changed or instcc.rc != 0" when: "gitcc is changed or instcc.rc != 0"
notify: notify:
- restart check-compose - restart check-compose

View file

@ -152,7 +152,7 @@
- selinux - selinux
- name: Install our general collectd selinux module - name: Install our general collectd selinux module
command: semodule -i /usr/share/collectd/fi-collectd.pp ansible.builtin.command: semodule -i /usr/share/collectd/fi-collectd.pp
when: ficgeneral_module is changed or ficgeneral_installed_version != ficgeneral_local_version when: ficgeneral_module is changed or ficgeneral_installed_version != ficgeneral_local_version
tags: tags:
- collectd - collectd
@ -175,7 +175,7 @@
- selinux - selinux
- name: Install our pstorefs/collectd selinux module - name: Install our pstorefs/collectd selinux module
command: semodule -i /usr/share/collectd/fi-pstorefs.pp ansible.builtin.command: semodule -i /usr/share/collectd/fi-pstorefs.pp
when: (ficpstorefs_module is changed or ficpstorefs_grep is changed) when: (ficpstorefs_module is changed or ficpstorefs_grep is changed)
tags: tags:
- collectd - collectd

View file

@ -46,7 +46,7 @@
- selinux - selinux
- name: Install our fcomm collectd selinux module - name: Install our fcomm collectd selinux module
command: semodule -i /usr/share/collectd/fi-collectd-fcomm.pp ansible.builtin.command: semodule -i /usr/share/collectd/fi-collectd-fcomm.pp
when: ficfcomm_module is changed or ficfcomm_grep is changed when: ficfcomm_module is changed or ficfcomm_grep is changed
tags: tags:
- collectd - collectd

View file

@ -83,7 +83,7 @@
# https://fedoraproject.org/wiki/Changes/StrongCryptoSettings # https://fedoraproject.org/wiki/Changes/StrongCryptoSettings
- name: fallback to the legacy crypto policies - name: fallback to the legacy crypto policies
command: update-crypto-policies --set DEFAULT:SHA1 ansible.builtin.command: update-crypto-policies --set DEFAULT:SHA1
when: when:
- preparing_image - preparing_image

View file

@ -7,7 +7,7 @@
when: not services_disabled when: not services_disabled
- name: systemctl daemon-reload - name: systemctl daemon-reload
command: /usr/bin/systemctl daemon-reload ansible.builtin.command: /usr/bin/systemctl daemon-reload
- name: restart lighttpd - name: restart lighttpd
action: service name=lighttpd state=restarted action: service name=lighttpd state=restarted

View file

@ -4,5 +4,5 @@
register: cloud_pem_copied register: cloud_pem_copied
- name: Update certificates - name: Update certificates
command: /usr/bin/update-ca-trust ansible.builtin.command: /usr/bin/update-ca-trust
when: cloud_pem_copied.changed when: cloud_pem_copied.changed

View file

@ -70,7 +70,7 @@
- provision_config - provision_config
- name: Check known_hosts file - name: Check known_hosts file
command: stat /home/copr/.ssh/known_hosts ansible.builtin.command: stat /home/copr/.ssh/known_hosts
register: hostsstat register: hostsstat
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -155,7 +155,7 @@
tags: logrotate tags: logrotate
- name: Fix selinux context on helper scripts - name: Fix selinux context on helper scripts
command: restorecon -irv /usr/local/bin/copr-lighty* ansible.builtin.command: restorecon -irv /usr/local/bin/copr-lighty*
when: logrotate_scripts.changed when: logrotate_scripts.changed
tags: logrotate tags: logrotate
@ -277,13 +277,13 @@
shell: "chown -R copr:copr /var/lib/copr/public_html" shell: "chown -R copr:copr /var/lib/copr/public_html"
when: '"copr" not in copr_results_dir_st.stat.pw_name' when: '"copr" not in copr_results_dir_st.stat.pw_name'
- command: "ls -dZ /var/lib/copr/public_html/" - ansible.builtin.command: "ls -dZ /var/lib/copr/public_html/"
register: public_html_ls register: public_html_ls
check_mode: no check_mode: no
changed_when: false changed_when: false
- name: Update selinux context for results if root folder does not have proper type - name: Update selinux context for results if root folder does not have proper type
command: "restorecon -vvRF /var/lib/copr/public_html/" ansible.builtin.command: "restorecon -vvRF /var/lib/copr/public_html/"
when: "public_html_ls is defined and 'copr_data_t' not in public_html_ls.stdout" when: "public_html_ls is defined and 'copr_data_t' not in public_html_ls.stdout"
# - name: Install cert to access fed-cloud09 # - name: Install cert to access fed-cloud09
@ -364,7 +364,7 @@
register: selinux_module register: selinux_module
- name: Install our custom selinux module - name: Install our custom selinux module
command: semodule -i /usr/local/share/copr/copr_rules.pp ansible.builtin.command: semodule -i /usr/local/share/copr/copr_rules.pp
when: selinux_module is changed when: selinux_module is changed
- name: Setup AWS access - name: Setup AWS access

View file

@ -94,7 +94,7 @@
# check_mode: no # check_mode: no
# #
# - name: Disable offloading # - name: Disable offloading
# command: ethtool -K ens5 tso off gro off gso off # ansible.builtin.command: ethtool -K ens5 tso off gro off gso off
# when: # when:
# - offloading.rc == 0 # - offloading.rc == 0
# - ansible_distribution == 'Fedora' # - ansible_distribution == 'Fedora'

View file

@ -123,13 +123,13 @@
- selinux - selinux
- name: Install our custom selinux policy for cgit - name: Install our custom selinux policy for cgit
command: semodule -i /usr/local/share/selinux/git_script_t.pp ansible.builtin.command: semodule -i /usr/local/share/selinux/git_script_t.pp
when: cgit_selinux_module is changed when: cgit_selinux_module is changed
tags: tags:
- selinux - selinux
- name: Create CGIT config file if it does not exist (takes almost an hour) - name: Create CGIT config file if it does not exist (takes almost an hour)
command: /usr/bin/copr-dist-git-refresh-cgit creates=/var/cache/cgit/repo-configuration.rc ansible.builtin.command: /usr/bin/copr-dist-git-refresh-cgit creates=/var/cache/cgit/repo-configuration.rc
- name: Ensure that .config directory exists - name: Ensure that .config directory exists
ansible.builtin.file: path=/home/copr-dist-git/.config state=directory ansible.builtin.file: path=/home/copr-dist-git/.config state=directory

View file

@ -2,12 +2,12 @@
- import_tasks: "mount_fs.yml" - import_tasks: "mount_fs.yml"
- name: Register security context for pgsql directory - name: Register security context for pgsql directory
command: "ls -dZ /var/lib/pgsql" ansible.builtin.command: "ls -dZ /var/lib/pgsql"
register: pgsql_ls register: pgsql_ls
changed_when: false # `ls' command is not changing anything changed_when: false # `ls' command is not changing anything
- name: Update selinux context for postgress db dir if it's wrong - name: Update selinux context for postgress db dir if it's wrong
command: "restorecon -vvRF /var/lib/pgsql" ansible.builtin.command: "restorecon -vvRF /var/lib/pgsql"
when: pgsql_ls.stdout is defined and 'postgresql_db_t' not in pgsql_ls.stdout when: pgsql_ls.stdout is defined and 'postgresql_db_t' not in pgsql_ls.stdout
- name: Install weekly custom copr-frontend-crontab - name: Install weekly custom copr-frontend-crontab
@ -103,7 +103,7 @@
- import_tasks: "psql_setup.yml" - import_tasks: "psql_setup.yml"
- name: Upgrade db to head - name: Upgrade db to head
command: alembic-3 upgrade head ansible.builtin.command: alembic-3 upgrade head
become: yes become: yes
become_user: copr-fe become_user: copr-fe
args: args:
@ -112,7 +112,7 @@
changed_when: alembic_result.stdout is search("Running upgrade") changed_when: alembic_result.stdout is search("Running upgrade")
- name: Apply the config comments - name: Apply the config comments
command: copr-frontend chroots-template ansible.builtin.command: copr-frontend chroots-template
become: yes become: yes
become_user: copr-fe become_user: copr-fe
args: args:
@ -160,7 +160,7 @@
- name: Register whether indexes rebuild is required - name: Register whether indexes rebuild is required
command: copr-frontend update_indexes_required ansible.builtin.command: copr-frontend update_indexes_required
become: yes become: yes
become_user: copr-fe become_user: copr-fe
register: update_indexes_required_result register: update_indexes_required_result
@ -168,7 +168,7 @@
failed_when: false failed_when: false
- name: Rebuild indexes - name: Rebuild indexes
command: ./manage.py update_indexes ansible.builtin.command: ./manage.py update_indexes
become: yes become: yes
become_user: copr-fe become_user: copr-fe
args: args:

View file

@ -52,7 +52,7 @@
register: selinux_module register: selinux_module
- name: Install our custom selinux module - name: Install our custom selinux module
command: semodule -i /usr/local/share/copr/copr_rules.pp ansible.builtin.command: semodule -i /usr/local/share/copr/copr_rules.pp
when: selinux_module is changed when: selinux_module is changed
- selinux: policy=targeted state=enforcing - selinux: policy=targeted state=enforcing

View file

@ -80,7 +80,7 @@
- pagure - pagure
- name: Create the "git" user - name: Create the "git" user
command: useradd --create-home --home-dir=/srv/git/ git ansible.builtin.command: useradd --create-home --home-dir=/srv/git/ git
creates=/srv/git/ creates=/srv/git/
when: env == 'staging' when: env == 'staging'
tags: tags:
@ -154,7 +154,7 @@
- restart apache - restart apache
- name: Create the database scheme - name: Create the database scheme
command: /usr/bin/python3 /usr/share/pagure/pagure_createdb.py ansible.builtin.command: /usr/bin/python3 /usr/share/pagure/pagure_createdb.py
changed_when: "1 != 1" changed_when: "1 != 1"
environment: environment:
PAGURE_CONFIG: /etc/pagure/pagure.cfg PAGURE_CONFIG: /etc/pagure/pagure.cfg
@ -227,13 +227,13 @@
- name: Manually fix current default ACLs since Ansible doesnt know recursive acls - name: Manually fix current default ACLs since Ansible doesnt know recursive acls
when: acl_updates.changed when: acl_updates.changed
command: /usr/bin/setfacl -Rdm user:apache:rx /srv/git ansible.builtin.command: /usr/bin/setfacl -Rdm user:apache:rx /srv/git
tags: tags:
- pagure - pagure
- name: Manually fix current ACLs since Ansible doesnt know recursive acls - name: Manually fix current ACLs since Ansible doesnt know recursive acls
when: acl_updates.changed when: acl_updates.changed
command: /usr/bin/setfacl -Rm user:apache:rx /srv/git ansible.builtin.command: /usr/bin/setfacl -Rm user:apache:rx /srv/git
tags: tags:
- pagure - pagure

View file

@ -268,7 +268,7 @@
- selinux - selinux
- name: Check the selinux context of the Lookaside Cache root directory - name: Check the selinux context of the Lookaside Cache root directory
command: matchpathcon /srv/cache ansible.builtin.command: matchpathcon /srv/cache
register: lcachecontext register: lcachecontext
check_mode: no check_mode: no
changed_when: false changed_when: false
@ -279,7 +279,7 @@
- distgit - distgit
- name: Set the SELinux policy for the Lookaside Cache root directory - name: Set the SELinux policy for the Lookaside Cache root directory
command: semanage fcontext -a -t nfs_t "/srv/cache(/.*)?" ansible.builtin.command: semanage fcontext -a -t nfs_t "/srv/cache(/.*)?"
when: lcachecontext.stdout.find('nfs_t') == -1 and env != "staging" when: lcachecontext.stdout.find('nfs_t') == -1 and env != "staging"
tags: tags:
- config - config
@ -319,7 +319,7 @@
tags: selinux tags: selinux
- name: Install our custom selinux policy - name: Install our custom selinux policy
command: semodule -i /usr/local/share/selinux/upload_cgi.pp ansible.builtin.command: semodule -i /usr/local/share/selinux/upload_cgi.pp
when: selinux_module is changed when: selinux_module is changed
tags: selinux tags: selinux
@ -329,7 +329,7 @@
tags: selinux tags: selinux
- name: Install our custom nfs selinux policy - name: Install our custom nfs selinux policy
command: semodule -i /usr/local/share/selinux/cgi-nfs.pp ansible.builtin.command: semodule -i /usr/local/share/selinux/cgi-nfs.pp
when: nfs_selinux_module is changed when: nfs_selinux_module is changed
tags: selinux tags: selinux
@ -365,7 +365,7 @@
- pkgs - pkgs
- name: Run initial grokmirror run - name: Run initial grokmirror run
command: /usr/bin/grok-manifest -m /srv/git/grokmirror/manifest.js.gz -t /srv/git/repositories/ creates=/srv/git/grokmirror/manifest.js.gz ansible.builtin.command: /usr/bin/grok-manifest -m /srv/git/grokmirror/manifest.js.gz -t /srv/git/repositories/ creates=/srv/git/grokmirror/manifest.js.gz
when: env != "staging" when: env != "staging"
tags: tags:
- grokmirror - grokmirror

View file

@ -50,7 +50,7 @@
- dns - dns
# - name: Create GeoIP acl # - name: Create GeoIP acl
# command: /var/named/GeoIP.sh # ansible.builtin.command: /var/named/GeoIP.sh
# changed_when: "1 != 1" # changed_when: "1 != 1"
# notify: # notify:
# - restart named # - restart named
@ -82,7 +82,7 @@
- dns - dns
- name: Update dns - name: Update dns
command: /usr/local/bin/update-dns ansible.builtin.command: /usr/local/bin/update-dns
changed_when: "1 != 1" changed_when: "1 != 1"
notify: notify:
- restart named - restart named
@ -96,14 +96,14 @@
- dns - dns
- name: Check configuration - name: Check configuration
command: named-checkconf -zj ansible.builtin.command: named-checkconf -zj
changed_when: false changed_when: false
tags: tags:
- config - config
- dns - dns
- name: Check semanage ports - name: Check semanage ports
command: semanage port -l ansible.builtin.command: semanage port -l
register: semanageoutput register: semanageoutput
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -111,7 +111,7 @@
- dns - dns
- name: Set ports so bind statistics-channel can bind to 8053 - name: Set ports so bind statistics-channel can bind to 8053
command: semanage port -a -t dns_port_t -p tcp 8053 ansible.builtin.command: semanage port -a -t dns_port_t -p tcp 8053
when: semanageoutput.stdout.find("8053") == -1 when: semanageoutput.stdout.find("8053") == -1
notify: notify:
- restart named - restart named

View file

@ -18,7 +18,7 @@
seboolean: name=httpd_use_nfs state=yes persistent=yes seboolean: name=httpd_use_nfs state=yes persistent=yes
- name: Check the selinux context rsyncd log - name: Check the selinux context rsyncd log
command: matchpathcon /var/log/rsyncd-fedora.log ansible.builtin.command: matchpathcon /var/log/rsyncd-fedora.log
register: rsyncdlog register: rsyncdlog
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -27,7 +27,7 @@
- selinux - selinux
- name: /var/log/rsyncd-fedora.log file context - name: /var/log/rsyncd-fedora.log file context
command: semanage fcontext -a -t rsync_log_t /var/log/rsyncd-fedora.log ansible.builtin.command: semanage fcontext -a -t rsync_log_t /var/log/rsyncd-fedora.log
when: rsyncdlog.stdout.find('rsync_log_t') == -1 when: rsyncdlog.stdout.find('rsync_log_t') == -1
tags: tags:
- config - config
@ -40,7 +40,7 @@
ansible.builtin.copy: src=logrotate-rsync-fedora dest=/etc/logrotate.d/rsync-fedora ansible.builtin.copy: src=logrotate-rsync-fedora dest=/etc/logrotate.d/rsync-fedora
- name: Check the selinux context pubdir - name: Check the selinux context pubdir
command: matchpathcon /srv/pub ansible.builtin.command: matchpathcon /srv/pub
register: pubdir register: pubdir
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -49,7 +49,7 @@
- selinux - selinux
- name: /srv/pub file contexts - name: /srv/pub file contexts
command: semanage fcontext -a -t httpd_sys_content_t "/srv/pub(/.*)?" ansible.builtin.command: semanage fcontext -a -t httpd_sys_content_t "/srv/pub(/.*)?"
when: pubdir.stdout.find('httpd_sys_content_t') == -1 when: pubdir.stdout.find('httpd_sys_content_t') == -1
tags: tags:
- config - config

View file

@ -8,4 +8,4 @@
# apply created openshift resources # apply created openshift resources
- name: Oc apply resources - name: Oc apply resources
command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/fas2discourse-operator/secret-discourse-apikey.yml" ansible.builtin.command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/fas2discourse-operator/secret-discourse-apikey.yml"

View file

@ -21,4 +21,4 @@
# apply created openshift resources # apply created openshift resources
- name: Oc apply resources - name: Oc apply resources
command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/fas2discourse-operator/secret-keytab.yml" ansible.builtin.command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/fas2discourse-operator/secret-keytab.yml"

View file

@ -8,4 +8,4 @@
# apply created openshift resources # apply created openshift resources
- name: Oc apply resources - name: Oc apply resources
command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/fas2discourse-operator/namespace.yml" ansible.builtin.command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/fas2discourse-operator/namespace.yml"

View file

@ -265,7 +265,7 @@
- fedmsg/base - fedmsg/base
- name: Install our custom selinux module - name: Install our custom selinux module
command: semodule -i /usr/local/share/fedmsg/fedmsg.pp ansible.builtin.command: semodule -i /usr/local/share/fedmsg/fedmsg.pp
when: selinux_module is changed when: selinux_module is changed
tags: tags:
- fedmsg/base - fedmsg/base
@ -273,7 +273,7 @@
# Also, label the ports that we commonly use for fedmsg under mod_wsgi # Also, label the ports that we commonly use for fedmsg under mod_wsgi
# to be http_port_t so selinux lets apache bind there. # to be http_port_t so selinux lets apache bind there.
- name: Check semanage ports - name: Check semanage ports
command: semanage port -l ansible.builtin.command: semanage port -l
register: semanageoutput register: semanageoutput
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -281,7 +281,7 @@
- fedmsg/base - fedmsg/base
- name: Set ports so httpd can bind to fedmsg endpoints - name: Set ports so httpd can bind to fedmsg endpoints
command: semanage port -a -t http_port_t -p tcp 3000-3100 ansible.builtin.command: semanage port -a -t http_port_t -p tcp 3000-3100
when: semanageoutput.stdout.find("3000-3100") == -1 when: semanageoutput.stdout.find("3000-3100") == -1
tags: tags:
- fedmsg/base - fedmsg/base

View file

@ -1,6 +1,6 @@
# Restart handler for our fedora-messaging consumers # Restart handler for our fedora-messaging consumers
--- ---
- name: Conditionally restart fedora_nightlies consumer service - name: Conditionally restart fedora_nightlies consumer service
command: /usr/local/bin/conditional-restart.sh fm-consumer@fedora_nightlies ansible.builtin.command: /usr/local/bin/conditional-restart.sh fm-consumer@fedora_nightlies
listen: listen:
- restart fedora_nightlies - restart fedora_nightlies

View file

@ -91,14 +91,14 @@
register: gitfn register: gitfn
- name: Check if fedora_nightlies is installed for current Python - name: Check if fedora_nightlies is installed for current Python
command: "pip show fedora_nightlies" ansible.builtin.command: "pip show fedora_nightlies"
register: instfn register: instfn
changed_when: "1 != 1" changed_when: "1 != 1"
failed_when: "1 != 1" failed_when: "1 != 1"
check_mode: no check_mode: no
- name: Install fedora_nightlies - name: Install fedora_nightlies
command: "python3 -m pip install --no-deps /root/fedora_nightlies" ansible.builtin.command: "python3 -m pip install --no-deps /root/fedora_nightlies"
when: "gitfn is changed or instfn.rc != 0" when: "gitfn is changed or instfn.rc != 0"
notify: notify:
- restart fedora_nightlies - restart fedora_nightlies

View file

@ -69,7 +69,7 @@
- config - config
- name: Check the selinux context freemedia - name: Check the selinux context freemedia
command: matchpathcon /srv/web/freemedia ansible.builtin.command: matchpathcon /srv/web/freemedia
register: freemediacontext register: freemediacontext
check_mode: no check_mode: no
changed_when: "1 != 1" changed_when: "1 != 1"
@ -79,7 +79,7 @@
- selinux - selinux
- name: /srv/web/freemedia file contexts - name: /srv/web/freemedia file contexts
command: semanage fcontext -a -t httpd_sys_content_t "/srv/web/freemedia(/.*)?" ansible.builtin.command: semanage fcontext -a -t httpd_sys_content_t "/srv/web/freemedia(/.*)?"
when: freemediacontext.stdout.find('httpd_sys_content_t') == -1 when: freemediacontext.stdout.find('httpd_sys_content_t') == -1
tags: tags:
- config - config

View file

@ -101,7 +101,7 @@
- selinux - selinux
- name: Install our general haproxy selinux module - name: Install our general haproxy selinux module
command: semodule -i /usr/share/haproxy/fi-haproxy.pp ansible.builtin.command: semodule -i /usr/share/haproxy/fi-haproxy.pp
when: fi_haproxy_module is changed or fi_haproxy_grep is changed when: fi_haproxy_module is changed or fi_haproxy_grep is changed
tags: tags:
- haproxy - haproxy
@ -109,7 +109,7 @@
- name: Check haproxy cfg to make sure it is valid - name: Check haproxy cfg to make sure it is valid
command: haproxy -c -f /etc/haproxy/haproxy.cfg ansible.builtin.command: haproxy -c -f /etc/haproxy/haproxy.cfg
check_mode: no check_mode: no
register: haproxyconfigcheck register: haproxyconfigcheck
changed_when: haproxyconfigcheck.rc != 0 changed_when: haproxyconfigcheck.rc != 0

View file

@ -1,6 +1,6 @@
--- ---
- name: Clean sss caches - name: Clean sss caches
command: sss_cache -E ansible.builtin.command: sss_cache -E
- name: Restart sssd - name: Restart sssd
shell: systemctl restart sssd shell: systemctl restart sssd

View file

@ -8,7 +8,7 @@
- name: Check that sysadmin-main and referenced groups exist on IPA server(s) - name: Check that sysadmin-main and referenced groups exist on IPA server(s)
delegate_to: "{{ item[0] }}" delegate_to: "{{ item[0] }}"
command: "getent group {{ item[1] }}" ansible.builtin.command: "getent group {{ item[1] }}"
changed_when: false changed_when: false
loop: >- loop: >-
{{ {{

View file

@ -15,7 +15,7 @@
- vpn-client-enablement - vpn-client-enablement
- name: Enroll system as IPA client - name: Enroll system as IPA client
command: ansible.builtin.command:
cmd: ipa-client-install cmd: ipa-client-install
{% if (vpn | default(false)) %}{% for node in ipa_server_nodes | default([]) %} {% if (vpn | default(false)) %}{% for node in ipa_server_nodes | default([]) %}
--server={{ node }} --server={{ node }}

View file

@ -1,3 +1,3 @@
--- ---
- name: restart ipa - name: restart ipa
command: ipactl restart ansible.builtin.command: ipactl restart

View file

@ -260,7 +260,7 @@
# can't choose to let other users see their info or not. # can't choose to let other users see their info or not.
# #
# - name: Disable default permissions so we don't break our privacy policy # - name: Disable default permissions so we don't break our privacy policy
# command: # ansible.builtin.command:
# argv: # argv:
# - ipa # - ipa
# - permission-mod # - permission-mod
@ -275,7 +275,7 @@
# #
# # Because of the previous task, we must explicitely allow users to read their own data # # Because of the previous task, we must explicitely allow users to read their own data
# - name: Allow users to read their own data # - name: Allow users to read their own data
# command: # ansible.builtin.command:
# argv: # argv:
# - ipa # - ipa
# - selfservice-add # - selfservice-add

View file

@ -11,7 +11,7 @@
- name: Create servicedelegationrule entry - name: Create servicedelegationrule entry
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: ipa servicedelegationrule-add {{rulename}}-delegation ansible.builtin.command: ipa servicedelegationrule-add {{rulename}}-delegation
register: add_result register: add_result
check_mode: no check_mode: no
changed_when: "'Added service delegation rule' in add_result.stdout" changed_when: "'Added service delegation rule' in add_result.stdout"
@ -22,7 +22,7 @@
- name: Add servicedelegationrule members - name: Add servicedelegationrule members
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: ipa servicedelegationrule-add-member {{rulename}}-delegation --principals={{item.service}}/{{item.host}}@{{ipa_realm}} ansible.builtin.command: ipa servicedelegationrule-add-member {{rulename}}-delegation --principals={{item.service}}/{{item.host}}@{{ipa_realm}}
loop: "{{ members }}" loop: "{{ members }}"
register: add_member_result register: add_member_result
check_mode: no check_mode: no
@ -34,7 +34,7 @@
- name: Add servicedelegationrule targets - name: Add servicedelegationrule targets
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: ipa servicedelegationrule-add-target {{rulename}}-delegation --servicedelegationtargets={{item}}-delegation-targets ansible.builtin.command: ipa servicedelegationrule-add-target {{rulename}}-delegation --servicedelegationtargets={{item}}-delegation-targets
loop: "{{ targets }}" loop: "{{ targets }}"
register: add_target_result register: add_target_result
check_mode: no check_mode: no
@ -46,7 +46,7 @@
- name: Destroy admin ticket - name: Destroy admin ticket
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: kdestroy -A ansible.builtin.command: kdestroy -A
tags: tags:
- config - config
- krb5 - krb5

View file

@ -11,7 +11,7 @@
- name: Create servicedelegationtarget entry - name: Create servicedelegationtarget entry
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: ipa servicedelegationtarget-add {{targetname}}-delegation-targets ansible.builtin.command: ipa servicedelegationtarget-add {{targetname}}-delegation-targets
register: add_result register: add_result
check_mode: no check_mode: no
changed_when: "'Added service delegation target' in add_result.stdout" changed_when: "'Added service delegation target' in add_result.stdout"
@ -22,7 +22,7 @@
- name: Add servicedelegationtarget members - name: Add servicedelegationtarget members
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: ipa servicedelegationtarget-add-member {{targetname}}-delegation-targets --principals={{item.service}}/{{item.host}}@{{ipa_realm}} ansible.builtin.command: ipa servicedelegationtarget-add-member {{targetname}}-delegation-targets --principals={{item.service}}/{{item.host}}@{{ipa_realm}}
loop: "{{ members }}" loop: "{{ members }}"
register: add_member_result register: add_member_result
check_mode: no check_mode: no
@ -34,7 +34,7 @@
- name: Destroy admin ticket - name: Destroy admin ticket
delegate_to: "{{ ipa_server }}" delegate_to: "{{ ipa_server }}"
command: kdestroy -A ansible.builtin.command: kdestroy -A
tags: tags:
- config - config
- krb5 - krb5

View file

@ -41,7 +41,7 @@
- ipsilon - ipsilon
- name: Install Fedora-specific code if it changed - name: Install Fedora-specific code if it changed
command: ansible.builtin.command:
cmd: ./install.sh cmd: ./install.sh
chdir: /opt/ipsilon-fedora chdir: /opt/ipsilon-fedora
when: git_update is changed when: git_update is changed
@ -51,7 +51,7 @@
- ipsilon - ipsilon
- name: Install Fedora-specific code on initial run - name: Install Fedora-specific code on initial run
command: ansible.builtin.command:
cmd: ./install.sh cmd: ./install.sh
chdir: /opt/ipsilon-fedora chdir: /opt/ipsilon-fedora
creates: "{{ ansible_facts['python3']['sitelib'] }}/ipsilon/providers/openidc/plugins/account-scopes.py" creates: "{{ ansible_facts['python3']['sitelib'] }}/ipsilon/providers/openidc/plugins/account-scopes.py"
@ -70,7 +70,7 @@
- ipsilon - ipsilon
- name: Install ipsilon - name: Install ipsilon
command: ansible.builtin.command:
cmd: ipsilon-server-install cmd: ipsilon-server-install
--root-instance --root-instance
--admin-user=admin --admin-user=admin
@ -85,7 +85,7 @@
- ipsilon - ipsilon
- name: Destroy admin ticket - name: Destroy admin ticket
command: kdestroy -A ansible.builtin.command: kdestroy -A
tags: tags:
- ipsilon - ipsilon
@ -209,7 +209,7 @@
- name: Generate the saml2 metadata - name: Generate the saml2 metadata
become_user: ipsilon become_user: ipsilon
become: yes become: yes
command: ansible.builtin.command:
cmd: /usr/local/bin/prepare-saml2-metadata cmd: /usr/local/bin/prepare-saml2-metadata
creates: /etc/ipsilon/root/saml2/metadata.xml creates: /etc/ipsilon/root/saml2/metadata.xml
tags: tags:

View file

@ -54,24 +54,24 @@
- config - config
- name: Set up iscsi interface for EL8 - name: Set up iscsi interface for EL8
command: creates=/var/lib/iscsi/ifaces/{{ netapp_iscsi_interface_iad2 }} iscsiadm -m iface -I {{ netapp_iscsi_interface_iad2 }} --op=new ansible.builtin.command: creates=/var/lib/iscsi/ifaces/{{ netapp_iscsi_interface_iad2 }} iscsiadm -m iface -I {{ netapp_iscsi_interface_iad2 }} --op=new
when: ansible_distribution_major_version|int >= 8 and ansible_distribution == "RedHat" and datacenter == 'iad2' when: ansible_distribution_major_version|int >= 8 and ansible_distribution == "RedHat" and datacenter == 'iad2'
tags: tags:
- config - config
- name: Run iscsiadm command for initial connect to PHX2 vtap-fedora-iscsi01 - name: Run iscsiadm command for initial connect to PHX2 vtap-fedora-iscsi01
command: creates=/var/lib/iscsi/nodes/{{ netapp_iscsi_name }}/{{ netapp_iscsi_portal }},3260 /sbin/iscsiadm --mode node --targetname --portal {{ netapp_iscsi_portal }} -o new ; /sbin/iscsiadm --mode node --targetname {{ netapp_iscsi_name }} --portal {{ netapp_iscsi_portal }} --login ansible.builtin.command: creates=/var/lib/iscsi/nodes/{{ netapp_iscsi_name }}/{{ netapp_iscsi_portal }},3260 /sbin/iscsiadm --mode node --targetname --portal {{ netapp_iscsi_portal }} -o new ; /sbin/iscsiadm --mode node --targetname {{ netapp_iscsi_name }} --portal {{ netapp_iscsi_portal }} --login
tags: tags:
- config - config
- name: Run iscsiadm command for initial connect to IAD2 vtap-fedora-iscsi01 - name: Run iscsiadm command for initial connect to IAD2 vtap-fedora-iscsi01
command: creates=/var/lib/iscsi/nodes/{{ netapp_iscsi_name_iad2 }}/{{ netapp_iscsi_portal_iad2 }},3260 /sbin/iscsiadm --mode node --targetname --portal {{ netapp_iscsi_portal_iad2 }} -o new ; /sbin/iscsiadm --mode node --targetname {{ netapp_iscsi_name_iad2 }} --portal {{ netapp_iscsi_portal_iad2 }} --login ansible.builtin.command: creates=/var/lib/iscsi/nodes/{{ netapp_iscsi_name_iad2 }}/{{ netapp_iscsi_portal_iad2 }},3260 /sbin/iscsiadm --mode node --targetname --portal {{ netapp_iscsi_portal_iad2 }} -o new ; /sbin/iscsiadm --mode node --targetname {{ netapp_iscsi_name_iad2 }} --portal {{ netapp_iscsi_portal_iad2 }} --login
when: ansible_distribution_major_version|int >= 8 and ansible_distribution == "RedHat" and datacenter == 'iad2' when: ansible_distribution_major_version|int >= 8 and ansible_distribution == "RedHat" and datacenter == 'iad2'
tags: tags:
- config - config
# - name: Run iscsiadm command for initial connect to vtap-fedora-nfs01 # - name: Run iscsiadm command for initial connect to vtap-fedora-nfs01
# command: creates=/var/lib/iscsi/nodes/{{ netapp_nfs01_iscsi_name }}/{{ netapp_nfs01_iscsi_portal }},3260 /sbin/iscsiadm --mode node --targetname --portal {{ netapp_nfs01_iscsi_portal }} -o new ; /sbin/iscsiadm --mode node --targetname {{ netapp_nfs01_iscsi_name }} --portal {{ netapp_nfs01_iscsi_portal }} --login # ansible.builtin.command: creates=/var/lib/iscsi/nodes/{{ netapp_nfs01_iscsi_name }}/{{ netapp_nfs01_iscsi_portal }},3260 /sbin/iscsiadm --mode node --targetname --portal {{ netapp_nfs01_iscsi_portal }} -o new ; /sbin/iscsiadm --mode node --targetname {{ netapp_nfs01_iscsi_name }} --portal {{ netapp_nfs01_iscsi_portal }} --login
# tags: # tags:
# - config # - config
# when: inventory_hostname_short == "buildvmhost-10" # when: inventory_hostname_short == "buildvmhost-10"

Some files were not shown because too many files have changed in this diff Show more