noqqe » blog | sammelsurium | photos | projects | about

PuppetDB

2017-12-18 @ Puppet, PuppetDB, Software

Delete a node

delete from catalog_resources where title like '%hostname%';
delete from resource_params where value like '%hostname%';

Find resources based on their name

SELECT catalog_resources.file, certnames.certname
FROM catalog_resources
INNER JOIN certnames ON catalog_resources.certname_id = certnames.id
WHERE title LIKE '%<name of resource>%';