Execution
Date 14 May 2025 10:36:04 +0100
Duration 00:00:13.06
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.2 / 1.7.2
Python 3.10.10
Summary
33 Hosts
3 Tasks
95 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/RM10046.yaml

---
- name: Playbook for RM10046 tests
  hosts: all
  gather_facts: false
  tasks:
    - name: Gather info
      plesk_info:
      register: plsk
    - name: Run commands on plesk servers
      when: plsk.plesk_found
      ansible.builtin.shell: |
        set -o pipefail
        IP=$(hostname -I| awk '{print $1}') ; ((whois ns1.$(hostname) ; whois ns2.$(hostname)) | grep  -q $IP ) && ((whois ns1.$(hostname) ; whois ns2.$(hostname)) | grep  -q "Server Name" ) && echo OK || echo BAD
      args:
        executable: /bin/bash
      changed_when: false
      register: cmd_out
    - name: Show the result
      ansible.builtin.debug:
        var: cmd_out