Execution
Date 26 Aug 2024 13:16:53 +0100
Duration None
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.4
ara 1.7.1 / 1.7.1
Python 3.10.10
Summary
382 Hosts
7 Tasks
2385 Results
1 Plays
6 Files
0 Records

File: /home/ssh-gateway/ansible/centos_7_missing_mirrors.yaml

---
- name: Playbook to check which vps does not have ELS
  hosts: all
  gather_facts: false
  roles:
    - plesk
  tasks:
    - name: Check via yum
      when: "'Plesk' in plsk_out.stdout"
      block:
        - name: Run check-update
          ansible.builtin.shell: |
            set -o pipefail
            yum check-update
          args:
            executable: /bin/bash
          changed_when: false
          register: yum_out
          ignore_errors: true
        - name: See if the repo error is there
          ansible.builtin.debug:
            msg: "ERROR: Could not resolve host: mirrorlist.centos.org"
          when: "'Could not retrieve mirrorlist' in yum_output.stderr"