14 Commits

Author SHA1 Message Date
e4728f4a6a Updated CHANGELOG.md on "2023-01-30 18:27:16" 2023-01-30 18:27:16 +00:00
8ac7c14045 Added/removed OS'es for Molecule (#167) 2023-01-30 19:26:38 +01:00
8c665829e6 Updated CHANGELOG.md on "2023-01-30 18:02:07" 2023-01-30 18:02:07 +00:00
68da943438 update influxdata GPG key after rotation (#165)
Co-authored-by: Harald Krämer <harald.kraemer@serviceware.de>
2023-01-30 19:01:27 +01:00
5fad4a7a64 Updated CHANGELOG.md on "2023-01-30 17:40:06" 2023-01-30 17:40:06 +00:00
5eeb4d6409 Downgrade support (#160)
* Support downgrades
2023-01-30 18:39:21 +01:00
83fda666a8 Fixed issues with Windows paths containing spaces (#162)
* Update configure_windows.yml

Add Quotes

* Update main.yml

add quotes
2023-01-30 18:38:44 +01:00
9a548d825d Updated CHANGELOG.md on "2023-01-30 17:38:35" 2023-01-30 17:38:35 +00:00
6d3d9741f0 feat: Ensure check-mode works (#163)
This commit ensures that check-mode works on systems when this role is
run without any telegraf being installed.

Before

```
fatal: [host-1]: FAILED! => {"changed": false, "msg": "Could not find the requested service telegraf: host"}
```

After

```
fatal: [host-1]: FAILED! => {"changed": false, "msg": "Could not find the requested service telegraf: host"}
...ignoring
```
2023-01-30 18:37:53 +01:00
df4af3eeef Updated CHANGELOG.md on "2023-01-30 17:04:28" 2023-01-30 17:04:28 +00:00
6432640e89 Fix the molecule run as part of CI process (#166)
* Updating CI Job;
* Changing gpg rpm key;
2023-01-30 18:03:35 +01:00
4fd39fe753 Updated CHANGELOG.md on "2022-08-08 16:33:46" 2022-08-08 16:33:46 +00:00
e59d785c7e Updating CHANGELOG.md file for release 0.13.3 2022-08-08 18:33:10 +02:00
4bef71819d Updating CONTRIBUTORS file for release 0.13.3 2022-08-08 18:32:34 +02:00
8 changed files with 65 additions and 17 deletions

View File

@ -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: |

View File

@ -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:**

View File

@ -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

View File

@ -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

View File

@ -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 }}"

View File

@ -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:

View File

@ -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"

View File

@ -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"