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'
|
- '.github/workflows/telegraf.yml'
|
||||||
jobs:
|
jobs:
|
||||||
molecule:
|
molecule:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
molecule_distro:
|
molecule_distro:
|
||||||
- container: centos8
|
|
||||||
image: geerlingguy/docker-centos8-ansible:latest
|
|
||||||
- container: centos7
|
- container: centos7
|
||||||
image: geerlingguy/docker-centos7-ansible:latest
|
image: geerlingguy/docker-centos7-ansible:latest
|
||||||
|
- container: rocky8
|
||||||
|
image: geerlingguy/docker-rockylinux8-ansible
|
||||||
|
# - container: rocky9
|
||||||
|
# image: geerlingguy/docker-rockylinux9-ansible
|
||||||
- container: ubuntu2004
|
- container: ubuntu2004
|
||||||
image: geerlingguy/docker-ubuntu2004-ansible:latest
|
image: geerlingguy/docker-ubuntu2004-ansible:latest
|
||||||
- container: ubuntu1804
|
- container: ubuntu1804
|
||||||
@ -39,16 +41,18 @@ jobs:
|
|||||||
image: geerlingguy/docker-ubuntu1604-ansible:latest
|
image: geerlingguy/docker-ubuntu1604-ansible:latest
|
||||||
- container: debian9
|
- container: debian9
|
||||||
image: geerlingguy/docker-debian9-ansible:latest
|
image: geerlingguy/docker-debian9-ansible:latest
|
||||||
- container: debian8
|
- container: debian10
|
||||||
image: geerlingguy/docker-debian8-ansible:latest
|
image: geerlingguy/docker-debian10-ansible:latest
|
||||||
|
- container: debian11
|
||||||
|
image: geerlingguy/docker-debian11-ansible:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: Set up Python 3.7
|
- name: Set up Python 3.9
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.9
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
24
CHANGELOG.md
24
CHANGELOG.md
@ -2,7 +2,29 @@
|
|||||||
|
|
||||||
## [Unreleased](https://github.com/dj-wasabi/ansible-telegraf/tree/HEAD)
|
## [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:**
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
Ilkka Tengvall
|
Ilkka Tengvall
|
||||||
Ismael
|
Ismael
|
||||||
Jack Ivy
|
Jack Ivy
|
||||||
|
Jeff Mahoney
|
||||||
Jeroen Geusebroek
|
Jeroen Geusebroek
|
||||||
Kyle
|
Kyle
|
||||||
Laurent Hoss
|
Laurent Hoss
|
||||||
@ -25,11 +26,13 @@
|
|||||||
Olivier Boukili
|
Olivier Boukili
|
||||||
Pascal
|
Pascal
|
||||||
Pavel Savchenko
|
Pavel Savchenko
|
||||||
|
PeterSzegedi
|
||||||
Puneeth Nanjundaswamy
|
Puneeth Nanjundaswamy
|
||||||
Rick Box
|
Rick Box
|
||||||
Rohit Gohri
|
Rohit Gohri
|
||||||
Romain BUREAU
|
Romain BUREAU
|
||||||
Ryan Conway
|
Ryan Conway
|
||||||
|
Simo Tuomisto
|
||||||
Slawomir Skowron
|
Slawomir Skowron
|
||||||
Steve Durrheimer
|
Steve Durrheimer
|
||||||
Steven Wirges
|
Steven Wirges
|
||||||
@ -40,5 +43,8 @@
|
|||||||
Werner Dijkerman [GH bot]
|
Werner Dijkerman [GH bot]
|
||||||
aroglian
|
aroglian
|
||||||
gaelL
|
gaelL
|
||||||
|
kingphil
|
||||||
|
maxwondercorn
|
||||||
or
|
or
|
||||||
|
treanorjp
|
||||||
zend0
|
zend0
|
||||||
|
@ -77,7 +77,7 @@ telegraf_yum_baseurl:
|
|||||||
default: "https://repos.influxdata.com/{{ ansible_distribution|lower }}/{{ telegraf_redhat_releasever }}/$basearch/stable"
|
default: "https://repos.influxdata.com/{{ ansible_distribution|lower }}/{{ telegraf_redhat_releasever }}/$basearch/stable"
|
||||||
redhat: "https://repos.influxdata.com/rhel/{{ 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"
|
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:
|
telegraf_zypper_repos:
|
||||||
"opensuse tumbleweed": "http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Factory/"
|
"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_include: 'C:\Telegraf\telegraf_agent.d'
|
||||||
telegraf_win_service_args:
|
telegraf_win_service_args:
|
||||||
- -service install
|
- -service install
|
||||||
- -config {{ telegraf_win_install_dir }}\telegraf.conf
|
- '-config "{{ telegraf_win_install_dir }}\telegraf.conf"'
|
||||||
- --config-directory {{ telegraf_win_include }}
|
- '--config-directory "{{ telegraf_win_include }}"'
|
||||||
|
|
||||||
telegraf_mac_user: user
|
telegraf_mac_user: user
|
||||||
telegraf_mac_group: admin
|
telegraf_mac_group: admin
|
||||||
|
@ -8,18 +8,22 @@
|
|||||||
enabled: yes
|
enabled: yes
|
||||||
when: not telegraf_agent_docker
|
when: not telegraf_agent_docker
|
||||||
become: yes
|
become: yes
|
||||||
|
ignore_errors: "{{ ansible_check_mode }}"
|
||||||
|
|
||||||
- name: "Restart Telegraf container"
|
- name: "Restart Telegraf container"
|
||||||
docker_container:
|
docker_container:
|
||||||
name: "{{ telegraf_agent_docker_name }}"
|
name: "{{ telegraf_agent_docker_name }}"
|
||||||
restart: True
|
restart: True
|
||||||
when: telegraf_agent_docker
|
when: telegraf_agent_docker
|
||||||
|
ignore_errors: "{{ ansible_check_mode }}"
|
||||||
|
|
||||||
- name: "Restart Windows Telegraf"
|
- name: "Restart Windows Telegraf"
|
||||||
win_service:
|
win_service:
|
||||||
name: Telegraf
|
name: Telegraf
|
||||||
start_mode: auto
|
start_mode: auto
|
||||||
state: restarted
|
state: restarted
|
||||||
|
ignore_errors: "{{ ansible_check_mode }}"
|
||||||
|
|
||||||
- name: "Restart MacOS Telegraf"
|
- name: "Restart MacOS Telegraf"
|
||||||
command: brew services restart telegraf
|
command: brew services restart telegraf
|
||||||
|
ignore_errors: "{{ ansible_check_mode }}"
|
||||||
|
@ -10,10 +10,21 @@
|
|||||||
- ansible_os_family == 'RedHat'
|
- ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: "Apt get update"
|
- name: "Apt get update"
|
||||||
shell: apt-get update && apt-get install -y python-apt
|
shell: apt-get update
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == 'Debian'
|
- 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"
|
- name: "Installing packages on Debian"
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
@ -24,6 +35,7 @@
|
|||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == 'Debian'
|
- ansible_os_family == 'Debian'
|
||||||
|
- ansible_distribution_major_version in [9, 10]
|
||||||
|
|
||||||
- name: "Installing packages on Suse"
|
- name: "Installing packages on Suse"
|
||||||
zypper:
|
zypper:
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
|
|
||||||
- name: "Debian | Download Telegraf apt key"
|
- name: "Debian | Download Telegraf apt key"
|
||||||
apt_key:
|
apt_key:
|
||||||
url: "https://repos.influxdata.com/influxdb.key"
|
url: "https://repos.influxdata.com/influxdata-archive.key"
|
||||||
id: 2582E0C5
|
id: 7df8b07e
|
||||||
state: present
|
state: present
|
||||||
register: are_telegraf_dependencies_keys_installed
|
register: are_telegraf_dependencies_keys_installed
|
||||||
until: are_telegraf_dependencies_keys_installed is succeeded
|
until: are_telegraf_dependencies_keys_installed is succeeded
|
||||||
@ -96,6 +96,7 @@
|
|||||||
apt:
|
apt:
|
||||||
deb: "{{ telegraf_agent_package_path }}/{{ telegraf_agent_package }}"
|
deb: "{{ telegraf_agent_package_path }}/{{ telegraf_agent_package }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
allow_downgrade: yes
|
||||||
register: is_telegraf_package_installed
|
register: is_telegraf_package_installed
|
||||||
until: is_telegraf_package_installed is succeeded
|
until: is_telegraf_package_installed is succeeded
|
||||||
notify: "Restart Telegraf"
|
notify: "Restart Telegraf"
|
||||||
|
@ -98,13 +98,13 @@
|
|||||||
- service_result.exists
|
- service_result.exists
|
||||||
|
|
||||||
- name: "Windows | Unregister Service"
|
- 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
|
register: telegraf_windows_uninstall
|
||||||
when:
|
when:
|
||||||
- service_result.exists
|
- service_result.exists
|
||||||
|
|
||||||
- name: "Windows | Register Service"
|
- 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
|
register: telegraf_windows_install
|
||||||
|
|
||||||
- name: "Windows | Set service startup mode to auto and ensure it is started"
|
- name: "Windows | Set service startup mode to auto and ensure it is started"
|
||||||
|
Reference in New Issue
Block a user