Initial Lab Setup
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Deploy Telegraf to Goldeneye
|
||||
hosts: endor
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Install Telegraf package
|
||||
ansible.builtin.apt:
|
||||
name: telegraf
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Push Telegraf configuration
|
||||
ansible.builtin.template:
|
||||
src: templates/telegraf.conf.j2
|
||||
dest: /etc/telegraf/telegraf.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Ensure Telegraf is started and enabled
|
||||
ansible.builtin.service:
|
||||
name: telegraf
|
||||
state: restarted
|
||||
enabled: yes
|
||||
Reference in New Issue
Block a user