redat
09/05/2025, 11:24 AMpuppetlabs::mysql modules, but I end up with errors.redat
09/05/2025, 11:26 AMtuxmea
09/05/2025, 11:58 AMredat
09/05/2025, 11:59 AMredat
09/05/2025, 12:17 PMredat
09/05/2025, 12:22 PMresource_api but I end with an error `undefined method `find`` .. I'll try with the V1 API 😄tuxmea
09/05/2025, 12:43 PMredat
09/05/2025, 1:20 PMtuxmea
09/05/2025, 1:43 PMredat
09/05/2025, 2:02 PMYury Bushmelev
09/06/2025, 2:54 PMredat
09/08/2025, 1:06 PMensure => present field.. But the other does, otherwise it's not created.. Would you happen to know why ?
Here's my two types
This one need the ensure => present to work (it's like if the ensure default value is not present )
Puppet::Type.newtype(:powerdns_zone) do
@doc = %q{
@summary Configure and manage a PowerDNS zone
}
ensurable
newparam(:value, namevar: true) do
desc "The value of the zone"
end
newparam(:nameservers) do
desc "List of nameservers for the zone"
end
end
This one does work without the need for the ensure => present
Puppet::Type.newtype(:powerdns_record) do
@doc = %q{
@summary Create and manage a PowerDNS record
}
ensurable
newparam(:value, namevar: true) do
desc "Value of the record"
end
newparam(:zone) do
desc "Zone to which the record should be a part of"
end
newparam(:type) do
desc "Type of the DNS record"
end
newparam(:target) do
desc "Target to which the record should point to"
end
autorequire(:powerdns_zone) do
self[:zone]
end
endtuxmea
09/08/2025, 2:05 PMpuppet describe powerdns_zone and puppet describe powerdns_record .redat
09/08/2025, 2:07 PMpowerdns_record
======================
@summary Create and manage a PowerDNS record
Parameters
----------
- **ensure**
The basic property that the resource should be in.
Valid values are `present`, `absent`.
- **target**
Target to which the record should point to
- **type**
Type of the DNS record
Valid values are `A`, `AAAA`, `CNAME`, `SRV`, `NS`.
- **value** (*namevar*)
Value of the record
- **zone**
Zone to which the record should be a part of
Providers
---------
ruby
powerdns_zone
powerdns_zone
====================
@summary Configure and manage a PowerDNS zone
Parameters
----------
- **ensure**
The basic property that the resource should be in.
Valid values are `present`, `absent`.
- **nameservers**
List of nameservers for the zone
- **value** (*namevar*)
The value of the zone
Values can match `/^(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}\.$/`.
Providers
---------
rubytuxmea
09/08/2025, 2:13 PMfind /etc/puppetlabs/code/environments -type f -name powerdns_record.rb and also for the other type?tuxmea
09/08/2025, 2:14 PMpresent is the default if you use ensurabletuxmea
09/08/2025, 2:14 PMtuxmea
09/08/2025, 2:14 PMtuxmea
09/08/2025, 2:14 PMtuxmea
09/08/2025, 2:15 PMpuppet generate types after r10k deployment?redat
09/08/2025, 2:16 PMauto-rsync with Vagrant as I'm only starting to work on it.. But I'm sure that the code is properly deployed everytime !
I don't have any other file where the type is provided, only one file for each of my resources..
Yes I was also under the assumption that the ensurable would default to true.. and it seems to be doing it for one of the two resource, that's the strange part :')redat
09/10/2025, 8:35 AMensurable do
defaultvalues
defaultto :present
end
Not sure how, or why, but now it works as expected!