mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
e4728f4a6a | |||
8ac7c14045 | |||
8c665829e6 | |||
68da943438 | |||
5fad4a7a64 | |||
5eeb4d6409 | |||
83fda666a8 | |||
9a548d825d | |||
6d3d9741f0 | |||
df4af3eeef | |||
6432640e89 | |||
4fd39fe753 | |||
e59d785c7e | |||
4bef71819d |
18
.github/workflows/telegraf.yml
vendored
18
.github/workflows/telegraf.yml
vendored
@ -22,15 +22,17 @@ on:
|
||||
- '.github/workflows/telegraf.yml'
|
||||
jobs:
|
||||
molecule:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
molecule_distro:
|
||||
- container: centos8
|
||||
image: geerlingguy/docker-centos8-ansible:latest
|
||||
- container: centos7
|
||||
image: geerlingguy/docker-centos7-ansible:latest
|
||||
- container: rocky8
|
||||
image: geerlingguy/docker-rockylinux8-ansible
|
||||
# - container: rocky9
|
||||
# image: geerlingguy/docker-rockylinux9-ansible
|
||||
- container: ubuntu2004
|
||||
image: geerlingguy/docker-ubuntu2004-ansible:latest
|
||||
- container: ubuntu1804
|
||||
@ -39,16 +41,18 @@ jobs:
|
||||
image: geerlingguy/docker-ubuntu1604-ansible:latest
|
||||
- container: debian9
|
||||
image: geerlingguy/docker-debian9-ansible:latest
|
||||
- container: debian8
|
||||
image: geerlingguy/docker-debian8-ansible:latest
|
||||
- container: debian10
|
||||
image: geerlingguy/docker-debian10-ansible:latest
|
||||
- container: debian11
|
||||
image: geerlingguy/docker-debian11-ansible:latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Set up Python 3.7
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
python-version: 3.9
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
24
CHANGELOG.md
24
CHANGELOG.md
@ -2,7 +2,29 @@
|
||||
|
||||
## [Unreleased](https://github.com/dj-wasabi/ansible-telegraf/tree/HEAD)
|
||||
|
||||
[Full Changelog](https://github.com/dj-wasabi/ansible-telegraf/compare/0.13.2...HEAD)
|
||||
[Full Changelog](https://github.com/dj-wasabi/ansible-telegraf/compare/0.13.3...HEAD)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- Added/removed OS'es for Molecule CI testing [\#167](https://github.com/dj-wasabi/ansible-telegraf/pull/167) ([dj-wasabi](https://github.com/dj-wasabi))
|
||||
- Ensure check-mode works [\#163](https://github.com/dj-wasabi/ansible-telegraf/pull/163) ([pieterlexis-tomtom](https://github.com/pieterlexis-tomtom))
|
||||
- Downgrade support [\#160](https://github.com/dj-wasabi/ansible-telegraf/pull/160) ([maxnasonov](https://github.com/maxnasonov))
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- Don't install init script on SUSE/openSUSE systems running systemd [\#152](https://github.com/dj-wasabi/ansible-telegraf/issues/152)
|
||||
- Fix the molecule run as part of CI process [\#166](https://github.com/dj-wasabi/ansible-telegraf/pull/166) ([dj-wasabi](https://github.com/dj-wasabi))
|
||||
- update influxdata GPG key after rotation [\#165](https://github.com/dj-wasabi/ansible-telegraf/pull/165) ([Tetha](https://github.com/Tetha))
|
||||
- Fixed issues with Windows paths containing spaces [\#162](https://github.com/dj-wasabi/ansible-telegraf/pull/162) ([KlettIT](https://github.com/KlettIT))
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Influxdata key rotation causing failure [\#164](https://github.com/dj-wasabi/ansible-telegraf/issues/164)
|
||||
- Influxdb2 output [\#158](https://github.com/dj-wasabi/ansible-telegraf/issues/158)
|
||||
|
||||
## [0.13.3](https://github.com/dj-wasabi/ansible-telegraf/tree/0.13.3) (2022-03-21)
|
||||
|
||||
[Full Changelog](https://github.com/dj-wasabi/ansible-telegraf/compare/0.13.2...0.13.3)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
Ilkka Tengvall
|
||||
Ismael
|
||||
Jack Ivy
|
||||
Jeff Mahoney
|
||||
Jeroen Geusebroek
|
||||
Kyle
|
||||
Laurent Hoss
|
||||
@ -25,11 +26,13 @@
|
||||
Olivier Boukili
|
||||
Pascal
|
||||
Pavel Savchenko
|
||||
PeterSzegedi
|
||||
Puneeth Nanjundaswamy
|
||||
Rick Box
|
||||
Rohit Gohri
|
||||
Romain BUREAU
|
||||
Ryan Conway
|
||||
Simo Tuomisto
|
||||
Slawomir Skowron
|
||||
Steve Durrheimer
|
||||
Steven Wirges
|
||||
@ -40,5 +43,8 @@
|
||||
Werner Dijkerman [GH bot]
|
||||
aroglian
|
||||
gaelL
|
||||
kingphil
|
||||
maxwondercorn
|
||||
or
|
||||
treanorjp
|
||||
zend0
|
||||
|
@ -77,7 +77,7 @@ telegraf_yum_baseurl:
|
||||
default: "https://repos.influxdata.com/{{ ansible_distribution|lower }}/{{ telegraf_redhat_releasever }}/$basearch/stable"
|
||||
redhat: "https://repos.influxdata.com/rhel/{{ telegraf_redhat_releasever }}/$basearch/stable"
|
||||
rocky: "https://repos.influxdata.com/rhel/{{ telegraf_redhat_releasever }}/$basearch/stable"
|
||||
telegraf_yum_gpgkey: "https://repos.influxdata.com/influxdb.key"
|
||||
telegraf_yum_gpgkey: "https://repos.influxdata.com/influxdata-archive_compat.key"
|
||||
|
||||
telegraf_zypper_repos:
|
||||
"opensuse tumbleweed": "http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Factory/"
|
||||
@ -90,8 +90,7 @@ telegraf_win_logfile: 'C:\\Telegraf\\telegraf.log'
|
||||
telegraf_win_include: 'C:\Telegraf\telegraf_agent.d'
|
||||
telegraf_win_service_args:
|
||||
- -service install
|
||||
- -config {{ telegraf_win_install_dir }}\telegraf.conf
|
||||
- --config-directory {{ telegraf_win_include }}
|
||||
|
||||
- '-config "{{ telegraf_win_install_dir }}\telegraf.conf"'
|
||||
- '--config-directory "{{ telegraf_win_include }}"'
|
||||
telegraf_mac_user: user
|
||||
telegraf_mac_group: admin
|
||||
|
@ -8,18 +8,22 @@
|
||||
enabled: yes
|
||||
when: not telegraf_agent_docker
|
||||
become: yes
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
|
||||
- name: "Restart Telegraf container"
|
||||
docker_container:
|
||||
name: "{{ telegraf_agent_docker_name }}"
|
||||
restart: True
|
||||
when: telegraf_agent_docker
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
|
||||
- name: "Restart Windows Telegraf"
|
||||
win_service:
|
||||
name: Telegraf
|
||||
start_mode: auto
|
||||
state: restarted
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
|
||||
- name: "Restart MacOS Telegraf"
|
||||
command: brew services restart telegraf
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
|
@ -10,10 +10,21 @@
|
||||
- ansible_os_family == 'RedHat'
|
||||
|
||||
- name: "Apt get update"
|
||||
shell: apt-get update && apt-get install -y python-apt
|
||||
shell: apt-get update
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
|
||||
- name: "Installing packages on Debian"
|
||||
apt:
|
||||
name:
|
||||
- wget
|
||||
- "{{ 'gnupg-agent' if ansible_distribution_major_version in ['8', '18', '16'] else 'gpg-agent' }}"
|
||||
update_cache: True
|
||||
state: present
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
- ansible_distribution_major_version not in [9, 10]
|
||||
|
||||
- name: "Installing packages on Debian"
|
||||
apt:
|
||||
name:
|
||||
@ -24,6 +35,7 @@
|
||||
state: present
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
- ansible_distribution_major_version in [9, 10]
|
||||
|
||||
- name: "Installing packages on Suse"
|
||||
zypper:
|
||||
|
@ -39,8 +39,8 @@
|
||||
|
||||
- name: "Debian | Download Telegraf apt key"
|
||||
apt_key:
|
||||
url: "https://repos.influxdata.com/influxdb.key"
|
||||
id: 2582E0C5
|
||||
url: "https://repos.influxdata.com/influxdata-archive.key"
|
||||
id: 7df8b07e
|
||||
state: present
|
||||
register: are_telegraf_dependencies_keys_installed
|
||||
until: are_telegraf_dependencies_keys_installed is succeeded
|
||||
@ -96,6 +96,7 @@
|
||||
apt:
|
||||
deb: "{{ telegraf_agent_package_path }}/{{ telegraf_agent_package }}"
|
||||
state: "present"
|
||||
allow_downgrade: yes
|
||||
register: is_telegraf_package_installed
|
||||
until: is_telegraf_package_installed is succeeded
|
||||
notify: "Restart Telegraf"
|
||||
|
@ -98,13 +98,13 @@
|
||||
- service_result.exists
|
||||
|
||||
- name: "Windows | Unregister Service"
|
||||
win_command: '{{ telegraf_win_install_dir }}\telegraf.exe --service uninstall'
|
||||
win_command: '"{{ telegraf_win_install_dir }}\telegraf.exe" --service uninstall'
|
||||
register: telegraf_windows_uninstall
|
||||
when:
|
||||
- service_result.exists
|
||||
|
||||
- name: "Windows | Register Service"
|
||||
win_command: '{{ telegraf_win_install_dir }}\telegraf.exe {{ telegraf_win_service_args | join(" ") }}'
|
||||
win_command: '"{{ telegraf_win_install_dir }}\telegraf.exe" {{ telegraf_win_service_args | join(" ") }}'
|
||||
register: telegraf_windows_install
|
||||
|
||||
- name: "Windows | Set service startup mode to auto and ensure it is started"
|
||||
|
Reference in New Issue
Block a user