Skip to content

Instantly share code, notes, and snippets.

@FransUrbo
Created September 11, 2016 11:20
Show Gist options
  • Save FransUrbo/d3498882b751363a9e9035e6aee20f64 to your computer and use it in GitHub Desktop.
Save FransUrbo/d3498882b751363a9e9035e6aee20f64 to your computer and use it in GitHub Desktop.
Designate reverse DNS record
reverse:
type: OS::Designate::Record
properties:
description: { list_join:
[' - ', [
'Floating IP DNS Record',
{ str_split:
['.',
{ get_attr: [instance, first_address] }, 3]
}
] ]
}
name: { list_join:
['.', [
{ str_split:
['.',
{ get_attr: [instance, first_address] }, 3]
}
{ list_join:
['.', [
{ str_split: ['.', { get_attr: [instance, first_address] }, 2] },
{ str_split: ['.', { get_attr: [instance, first_address] }, 1] },
{ str_split: ['.', { get_attr: [instance, first_address] }, 0] },
'in-addr.arpa.'
] ]
}
] ]
}
domain: { list_join:
['.', [
{ str_split: ['.', { get_attr: [instance, first_address] }, 2] },
{ str_split: ['.', { get_attr: [instance, first_address] }, 1] },
{ str_split: ['.', { get_attr: [instance, first_address] }, 0] },
'in-addr.arpa.'
] ]
}
data: { list_join:
['.', [
{ list_join:
['-', [
{ list_join: ['-', [ { get_param: "OS::stack_name" }, 'swarm' ] ] }
{ str_split: ['.', { get_attr: [instance, first_address] }, 3] },
] ]
},
'domain.tld.'
] ]
}
type: PTR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment