role_add_ovh_dns_record/tasks/main.yml

21 lines
488 B
YAML
Raw Permalink Normal View History

2024-06-15 05:17:31 +00:00
---
# tasks file for role_add_ovh_dns_record
- name: install ovh python module
ansible.builtin.pip:
name:
- ovh
- name: Create A server record
ovh_dns:
state: present
domain: "{{ DOMAIN }}"
name: "{{ NAME }}"
type: "{{ TYPE }}"
value: "{{ VALUE }}"
environment:
OVH_ENDPOINT: ovh-eu
OVH_APPLICATION_KEY: "{{ OVH_APPLICATION_KEY }}"
OVH_APPLICATION_SECRET: "{{ OVH_APPLICATION_SECRET }}"
OVH_CONSUMER_KEY: "{{ OVH_DNS_CONSUMER_KEY }}"