Skip to content


deploying nxlog with ansible

Download and install “nxlog” and provide it with a “customized” version of “/etc/nslog.conf file. First the playbook that will execute only of host’s operating system is RHEL ver. 6:

---
- hosts: 
  remote_user:

  tasks:

   - name: download nxlog 
     yum: name=https://nxlog.co/system/files/products/files/1/nxlog-ce-2.9.1716-1_rhel6.x86_64.rpm state=installed
     notify: StartNxLog
     when: "ansible_os_family == 'RedHat' and ansible_distribution_major_version == '6'"

   - name: StartNxLog
     include: /root/playbooks/StartNxLog

The contents of the “include:” file “/root/playbooks/StartNxLog”

- name: copy config file
  copy: src=/root/playbooks/nxlog.conf dest=/etc/nxlog.conf owner=root group=root mode=664

- name: set nxlog service to start at boot and now
  service: name=nxlog enabled=yes state=started

Posted in LINUX.

Tagged with , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

WordPress Anti Spam by WP-SpamShield



Copyright © 2016 - 2017 Waldemar Mark Duszyk. All Rights Reserved. Created by Blog Copyright.