--- - name: "[Alpine] Install package: influxdb" apk: name: influxdb state: present when: - ansible_distribution == "Alpine" - name: "[Archlinux] Install package: influxdb" pacman: name: - influxdb - python-requests - python-influxdb state: present when: - ansible_distribution == "Archlinux" - name: "Create directory: /etc/systemd/system/influxdb.service.d" file: state: directory dest: /etc/systemd/system/influxdb.service.d mode: 0755 when: - ansible_service_mgr == "systemd" - name: Create systemd.service override for influxdb copy: src: service-override.conf dest: /etc/systemd/system/influxdb.service.d/override.conf mode: 0755 when: - ansible_service_mgr == "systemd"