Execution
Date 23 Apr 2024 16:44:31 +0100
Duration 00:04:16.52
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.4
ara 1.7.1 / 1.7.2.dev2
Python 3.10.10
Summary
495 Hosts
4 Tasks
1935 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/RM9537-versions-affected.yaml

---
- name: Playbook to check if vulnerable
  hosts: all
  vars:
    ara_playbook_name: RM9537-versions-affected.yaml
    ara_playbook_labels:
      - plesk
    folder: /home/ssh-gateway/ansible/playbook_output
  tasks:
    - name: Run iconv command and check for CN-EXT
      ansible.builtin.shell: |
        set -o pipefail
        iconv -l | grep -E 'CN-?EXT'
      args:
        executable: /bin/bash
      register: iconv_output
      ignore_errors: true
      changed_when: false

    - name: Write to file if the command has output
      ansible.builtin.lineinfile:
        dest: "{{ folder }}/RM9537-affected.txt"
        create: true
        mode: '0644'
        line: "{{ ansible_facts.nodename }} - affected"
      delegate_to: 127.0.0.1
      when: iconv_output.rc == 0

    - name: Write to file if the command has no output
      ansible.builtin.lineinfile:
        dest: "{{ folder }}/RM9537-affected.txt"
        create: true
        mode: '0644'
        line: "{{ ansible_facts.nodename }} - NOT AFFECTED"
      delegate_to: 127.0.0.1
      when: iconv_output.rc != 0