New in version 2.1.
- python >= 2.6
- influxdb >= 0.9
parameter | required | default | choices | comments |
---|---|---|---|---|
database_name |
yes | Name of the database where retention policy will be created | ||
default |
yes | Sets the retention policy as default retention policy | ||
duration |
yes | Determines how long InfluxDB should keep the data | ||
hostname |
yes | The hostname or IP address on which InfluxDB server is listening | ||
password |
no | root | Password that will be used to authenticate against InfluxDB server | |
policy_name |
yes | Name of the retention policy | ||
port |
no | 8086 | The port on which InfluxDB server is listening | |
replication |
yes | Determines how many independent copies of each point are stored in the cluster | ||
username |
no | root | Username that will be used to authenticate against InfluxDB server |
# 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 - 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
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is community maintained without core committer oversight.
For more information on what this means please read Module Support
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.