community / community.general / 0.1.4 / module / influxdb_retention_policy Manage InfluxDB retention policies Authors: Kamil Szczygiel (@kamsz)community.general.influxdb_retention_policy (0.1.4) — module
Install with ansible-galaxy collection install community.general:==0.1.4
collections: - name: community.general version: 0.1.4
Manage InfluxDB retention policies.
# Example influxdb_retention_policy command from Ansible Playbooks - name: Create 1 hour retention policy influxdb_retention_policy: hostname: "{{influxdb_ip_address}}" database_name: "{{influxdb_database_name}}" policy_name: test duration: 1h replication: 1 ssl: yes validate_certs: yes
- name: Create 1 day retention policy influxdb_retention_policy: hostname: "{{influxdb_ip_address}}" database_name: "{{influxdb_database_name}}" policy_name: test duration: 1d replication: 1
- name: Create 1 week retention policy influxdb_retention_policy: hostname: "{{influxdb_ip_address}}" database_name: "{{influxdb_database_name}}" policy_name: test duration: 1w replication: 1
- name: Create infinite retention policy influxdb_retention_policy: hostname: "{{influxdb_ip_address}}" database_name: "{{influxdb_database_name}}" policy_name: test duration: INF replication: 1 ssl: no validate_certs: no
ssl: description: - Use https instead of http to connect to InfluxDB server. type: bool path: description: - The path on which InfluxDB server is accessible type: str version_added: 0.2.0 version_added_collection: community.general port: default: 8086 description: - The port on which InfluxDB server is listening type: int default: description: - Sets the retention policy as default retention policy. type: bool proxies: description: - HTTP(S) proxy to use for Requests to connect to InfluxDB server. type: dict retries: default: 3 description: - Number of retries client will try before aborting. - C(0) indicates try until success. type: int timeout: description: - Number of seconds Requests will wait for client to establish a connection. type: int use_udp: description: - Use UDP to connect to InfluxDB server. type: bool duration: description: - Determines how long InfluxDB should keep the data. required: true type: str hostname: default: localhost description: - The hostname or IP address on which InfluxDB server is listening. - Since Ansible 2.5, defaulted to localhost. type: str password: aliases: - login_password default: root description: - Password that will be used to authenticate against InfluxDB server. - Alias C(login_password) added in Ansible 2.5. type: str udp_port: default: 4444 description: - UDP port to connect to InfluxDB server. type: int username: aliases: - login_username default: root description: - Username that will be used to authenticate against InfluxDB server. - Alias C(login_username) added in Ansible 2.5. type: str policy_name: description: - Name of the retention policy. required: true type: str replication: description: - Determines how many independent copies of each point are stored in the cluster. required: true type: int database_name: description: - Name of the database. required: true type: str validate_certs: default: true description: - If set to C(no), the SSL certificates will not be validated. - This should only set to C(no) used on personally controlled sites using self-signed certificates. type: bool