fsm_send_syslog

Playbook Task Examples

- name: SEND UDP/514 SYSLOG WITH AUTO HEADER
  fsm_send_syslog:
    host: "10.0.0.15"
    ignore_ssl_errors: "enable"
    syslog_message: "This is a test syslog from Ansible!"

- name: SEND UDP/514 SYSLOG WITH AUTO HEADER
  fsm_send_syslog:
    syslog_host: "10.7.220.61"
    ignore_ssl_errors: "enable"
    syslog_message: "This is a test syslog from Ansible!"

- name: SEND UDP/514 SYSLOG CUSTOM HEADER
  fsm_send_syslog:
    syslog_host: "10.7.220.61"
    ignore_ssl_errors: "enable"
    syslog_message: "This is a test syslog from Ansible!"
    syslog_header: "This is a TEST HEADER :"

- name: SEND TCP/1470 SYSLOG WITH CUSTOM HEADER
  fsm_send_syslog:
    syslog_host: "10.7.220.61"
    ignore_ssl_errors: "enable"
    network_port: 1470
    network_protocol: "tcp"
    syslog_message: "This is a test syslog from Ansible!"
    syslog_header: "This is a TEST HEADER TCP PORT 1470 :"

- name: SEND TCP/6514 TLS SYSLOG WITH CUSTOM HEADER
  fsm_send_syslog:
    syslog_host: "10.7.220.61"
    ignore_ssl_errors: "enable"
    network_port: 6514
    network_protocol: "tcp-tls1.2"
    syslog_message: "This is a test syslog from Ansible!"
    syslog_header: "This is a TEST HEADER TCP TLS PORT 6514 :"

- name: SEND UDP/514 SYSLOG WITH AUTO HEADER AND DIFF FACILITY AND LEVEL
  fsm_send_syslog:
    syslog_host: "10.7.220.61"
    ignore_ssl_errors: "enable"
    syslog_facility: "AUTH"
    syslog_level: "CRIT"
    syslog_message: "This is a test syslog from Ansible! WITH CRIT AND AUTH AS LEVELS AND FACILITY."

Playbook File Examples

fsm_send_syslogs.yml

- name: SEND SYSLOGS
  hosts: FortiSIEM
  connection: local
  gather_facts: False

  tasks:
    - name: SEND UDP/514 SYSLOG WITH AUTO HEADER
      fsm_send_syslog:
        syslog_host: "{{ inventory_hostname }}"
        ignore_ssl_errors: "enable"
        syslog_message: "This is a test syslog from Ansible!"

    - name: SEND UDP/514 SYSLOG WITH AUTO HEADER AND DIFF FACILITY AND LEVEL
      fsm_send_syslog:
        syslog_host: "{{ inventory_hostname }}"
        ignore_ssl_errors: "enable"
        syslog_facility: "AUTH"
        syslog_level: "CRIT"
        syslog_message: "This is a test syslog from Ansible! WITH CRIT AND AUTH AS LEVELS AND FACILITY."

    - name: SEND UDP/514 SYSLOG WITH AUTO HEADER
      fsm_send_syslog:
        syslog_host: "{{ inventory_hostname }}"
        ignore_ssl_errors: "enable"
        syslog_message: "This is a test syslog from Ansible!"

    - name: SEND UDP/514 SYSLOG CUSTOM HEADER
      fsm_send_syslog:
        syslog_host: "{{ inventory_hostname }}"
        ignore_ssl_errors: "enable"
        syslog_message: "This is a test syslog from Ansible!"
        syslog_header: "This is a TEST HEADER :"

    - name: SEND TCP/1470 SYSLOG WITH CUSTOM HEADER
      fsm_send_syslog:
        syslog_host: "{{ inventory_hostname }}"
        ignore_ssl_errors: "enable"
        network_port: 1470
        network_protocol: "tcp"
        syslog_message: "This is a test syslog from Ansible!"
        syslog_header: "This is a TEST HEADER TCP PORT 1470 :"

    - name: SEND TCP/6514 TLS SYSLOG WITH CUSTOM HEADER
      fsm_send_syslog:
        syslog_host: "{{ inventory_hostname }}"
        ignore_ssl_errors: "enable"
        network_port: 6514
        network_protocol: "tcp-tls1.2"
        syslog_message: "This is a test syslog from Ansible!"
        syslog_header: "This is a TEST HEADER TCP TLS PORT 6514 :"