How it works...

In the preceding task, we are creating a new type A DNS record app.example.com; under zone example.com and mapping it to multiple IP addresses.

We have used the parameter ttl (time to live), which can be seen as the lifespan or lifetime that a record can stay with the client without initiating a new DNS query for the same DNS record.

In the second task, we are retrieving an existing DNS record using a parameter called state with the input value get and registering the value we obtain in the variable name record. And later, in the third task, once we have that DNS record information in the variable, using the state parameter with the value absent, we delete that DNS record.

We should note that once we register the DNS record into the variable called record, the details of the required DNS record will change to the following:

  • Record as set.record
  • Ttl as set.ttl
  • Type as set.type
  • Value as set.value
We should note here that the preceding tasks will fail if they are executed without modifying the correct value of the zone parameter in the task.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset