Coder Social home page Coder Social logo

Comments (3)

lalmeras avatar lalmeras commented on June 21, 2024

I suppose only your last record is kept.

You must provide a replace: with a pattern so that ovh_dns does not replace all records, but only records with the same priority.

Without replace, ovh_dns updates the same DOMAIN MX record.

  - name: Add MX 1 aspmx.l.google.com.
    ovh_dns:
      state: present
      domain: DOMAIN
      name:
      type: MX
      value: "1 aspmx.l.google.com."
      replace: "1 .*"
  - name: Add 5 alt1.aspmx.l.google.com.
    ovh_dns:
      state: present
      domain: DOMAIN
      name:
      type: MX
      value: "5 alt1.aspmx.l.google.com."
      replace: "5 .*"

From my knowledge, you cannot manage multi-value records. I don't know how to handle easily how to set two MX record for each priority.

from ansible-ovh-dns.

matrixise avatar matrixise commented on June 21, 2024

Thanks for the suggestion/solution.

Yep, in fact, when you add a new record to OVH, you receive an ID, this ID should be store somewhere, but it's not the case.

I have tried with terraform and I don't have the issue because there is the state file.

from ansible-ovh-dns.

setop avatar setop commented on June 21, 2024

I suppose only your last record is kept.

You must provide a replace: with a pattern so that ovh_dns does not replace all records, but only records with the same priority.

Without replace, ovh_dns updates the same DOMAIN MX record.

  - name: Add MX 1 aspmx.l.google.com.
    ovh_dns:
      state: present
      domain: DOMAIN
      name:
      type: MX
      value: "1 aspmx.l.google.com."
      replace: "1 .*"
  - name: Add 5 alt1.aspmx.l.google.com.
    ovh_dns:
      state: present
      domain: DOMAIN
      name:
      type: MX
      value: "5 alt1.aspmx.l.google.com."
      replace: "5 .*"

From my knowledge, you cannot manage multi-value records. I don't know how to handle easily how to set two MX record for each priority.

You can have multiple MX records using "append" instead of "present". But in that case, I don't know how to remove previous values ...

from ansible-ovh-dns.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.