Linux Core | Enterprise Linux and Cloud Consulting

Expertise in DevOps, SRE, Cybersecurity, and Agile Infrastructure

Remote Linux Engineering Services in Netherlands / Benelux

DevOps, SRE, and Cybersecurity Consulting

Linux Systems Engineering and Automation

DevOps Linux Expert | SRE | Agile Infrastructure

Cloud Architecture and Security Engineering

Enterprise Linux, RedHat, Ububtu, Suse, Debian Architecture

Linux RedHat, Ububtu, Suse, Debian Engineering

Linux Core Logo





Linuxcore
A part of the Wonder Cohen group

Linuxcore – Enterprise Linux Consulting

Enterprise Linux Solutions for Secure, Scalable Infrastructure

Managed Services, Cloud Architecture, DevOps Automation, SRE Practices
Cybersecurity Engineering — tailored for high-performance, resilient environments

Discover Now
Terminal icon logo representing LinuxCore
 

# “Make Everything as simple as possible, but not simpler.” { Albert Einstein }

---
- name: Send an email to LinuxCore
  hosts: localhost
  gather_facts: false
  tasks:
    - name: Check SMTP service
      shell: netstat -tlnp | grep :25
      register: smtp_check
      failed_when: false

    - name: Fail if SMTP not running
      fail:
        msg: "SMTP service not running. Start with: sudo systemctl start postfix"
      when: smtp_check.rc != 0

    - name: Send notification email
      mail:
        host: "localhost"
        port: 25
        to: "info@linuxcore.nl"
        subject: "Hello Linux Core team"
        body: |
          Discover how LinuxCore can streamline your infrastructure.
          Our experts in Linux, DevOps, and cybersecurity are ready to assist.
      register: email_result
      retries: 2
      delay: 3

    - name: Report failure
      debug:
        msg: "Email failed: {{ email_result.msg }}"
      when: email_result is failed