--- - name: Deploy OVH configuration files template: src: templates/ovh.conf.j2 dest: "{{ ovh_backup_user_home }}/ovh.conf" mode: 0640 owner: "{{ ovh_backup_user }}" backup: yes - name: Enable OVH DNS backups systemd units systemd: name: backup_ovh.timer enabled: yes state: started # - name: Add A records to DNS # synthesio.ovh.domain: # name: "{{ item.name}}" # endpoint: "{{ ovh_endpoint }}" # application_key: "{{ ovh_application_key }}" # application_secret: "{{ ovh_application_secret }}" # consumer_key: "{{ ovh_consumer_key }}" # domain: "{{ item.domain }}" # value: "{{ item.value }}" # record_type: A # with_items: "{{ a_records }}" # - name: Add AAAA records to DNS # synthesio.ovh.domain: # name: "{{ item.name}}" # endpoint: "{{ ovh_endpoint }}" # application_key: "{{ ovh_application_key }}" # application_secret: "{{ ovh_application_secret }}" # consumer_key: "{{ ovh_consumer_key }}" # domain: "{{ item.domain }}" # value: "{{ item.value }}" # record_type: AAAA # with_items: "{{ aaaa_records }}" # - name: Add CNAME records to DNS # synthesio.ovh.domain: # name: "{{ item.name}}" # endpoint: "{{ ovh_endpoint }}" # application_key: "{{ ovh_application_key }}" # application_secret: "{{ ovh_application_secret }}" # consumer_key: "{{ ovh_consumer_key }}" # domain: "{{ item.domain }}" # value: "{{ item.value }}" # record_type: CNAME # with_items: "{{ cname_records }}" # - name: Add MX records to DNS # synthesio.ovh.domain: # name: "{{ item.name}}" # endpoint: "{{ ovh_endpoint }}" # application_key: "{{ ovh_application_key }}" # application_secret: "{{ ovh_application_secret }}" # consumer_key: "{{ ovh_consumer_key }}" # domain: "{{ item.domain }}" # value: "{{ item.value }}" # record_type: MX # with_items: "{{ mx_records }}" # - name: Add TXT records to DNS # synthesio.ovh.domain: # name: "{{ item.name}}" # endpoint: "{{ ovh_endpoint }}" # application_key: "{{ ovh_application_key }}" # application_secret: "{{ ovh_application_secret }}" # consumer_key: "{{ ovh_consumer_key }}" # domain: "{{ item.domain }}" # value: "{{ item.value }}" # record_type: TXT # with_items: "{{ txt_records }}" - name: Add other records to DNS synthesio.ovh.domain: name: "{{ item.name}}" endpoint: "{{ ovh_endpoint }}" application_key: "{{ ovh_application_key }}" application_secret: "{{ ovh_application_secret }}" consumer_key: "{{ ovh_consumer_key }}" domain: "{{ item.domain }}" value: "{{ item.value }}" record_type: "{{ item.record_type }}" record_ttl: "{{ item.record_ttl }}" state: "{{ item.state |default('present') }}" append: true loop: "{{ records }}" # when: item['domain'] == "susurrando.com" and "adpvm" in item['value']