Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/setup_influxdb/tasks/setup.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 - name: Install https transport for apt and ca-certificates
7 apt: name={{ item }} state=latest force=yes
8 with_items:
9 - apt-transport-https
10 - ca-certificates
11
12 - name: Install apt_key dependencies
13 pip: name={{ item }}
14 with_items:
15 - pyOpenSSL
16 - ndg-httpsclient
17 - pyasn1
18
19 - name: Make sure python3-debian is installed
20 ansible.builtin.apt:
21 name: python3-debian
22 state: present
23
24 - name: Add InfluxDB repository
25 ansible.builtin.deb822_repository:
26 update_cache: true
27 name: influxdb
28 types: deb
29 signed_by: https://repos.influxdata.com/influxdb.key
30 uris:
31 - https://repos.influxdata.com/ubuntu
32 suites:
33 - trusty
34 components:
35 - stable
36 state: present
37 register: apt_repo
38
39 - name: Update apt cache
40 ansible.builtin.apt:
41 update_cache: true
42 when: apt_repo is changed
43
44 - name: Install InfluxDB
45 ansible.builtin.apt:
46 name: influxdb
47 state: latest
48
49 - name: Start InfluxDB service
50 ansible.builtin.service:
51 name: influxdb
52 state: started