Execution
Date 03 Jun 2024 14:32:29 +0100
Duration 00:00:15.38
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
81 Hosts
1 Tasks
81 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/check-swap.yaml

---
- name: Check yaml size
  hosts: all
  gather_facts: false
  tasks:
    - name: Check the swap size
      ansible.builtin.shell: |
        set -o pipefail
        [ "$(swapon --show=SIZE --noheadings --bytes | awk '{sum += $1} END {print sum}')" -eq 1073741824 ] && echo "Swap size is 1G" || echo "Swap size is not 1G"
      args:
        executable: /bin/bash
      changed_when: false