It looks like you're attempting to apply manifest.pp not using the agent.  
The apply is looking for the class/type definitions locally, which don't 
exist.

Why not update manifest/site.pp on the puppet master for the applicable 
environment, then use puppet agent -t?

On my PM, I use Hiera to manage the classes and configuration keys:

agrams@puppet:~/puppet/control-repo$ cat manifests/site.pp
hiera_include('classes')


agrams@puppet:~/puppet/control-repo$ cat data/app/puppetmaster.yaml
---
# Include the following classes
classes:
  - puppetdb
  - puppetdb::master::config
  - r10k
  - r10k::webhook
  - r10k::webhook::config
# Class parameter values
r10k::remote: '[email protected]:puppet/control-repo.git'
r10k::webhook::config::use_mcollective: false
r10k::webhook::config::public_key_path: 
'/etc/puppetlabs/puppet/ssl/certs/puppet.x.org.pem'
r10k::webhook::config::private_key_path: 
'/etc/puppetlabs/puppet/ssl/private_keys/puppet.x.org.pem'
r10k::webhook::config::user: 'puppet'
r10k::webhook::config::generate_types: true
r10k::webhook::config::r10k_deploy_arguments: '-pv'
r10k::webhook::config::pass: >
    ENC[PKCS7,MIIBeQYJKoZIhvcNAQcDoIIBajCCAWYCAQAxggEhMIIBHQIBADAFMAACAQEw
...
r10k::webhook::ruby_bin: '/usr/bin/ruby'
r10k::webhook::user: 'root'
r10k::webhook::group: 'root'

Axton

On Friday, November 8, 2019 at 11:55:17 AM UTC-6, Keyzer Suze wrote:
>
> Hi
>
> Having another go at puppet :)
> Bulidng a Centos 8 with puppet install
> I have built the VM
> and I have added int he puppet repo 
>
>
> yum install https://yum.puppet.com/puppet-release-el-8.noarch.rpm
>
> [puppet]
> name=Puppet Repository el 8 - $basearch
> baseurl=http://yum.puppetlabs.com/puppet/el/8/$basearch
> gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-release
> enabled=1
> gpgcheck=1
>
>
>
> I am using https://puppet.com/docs/puppet/latest/install_puppet.html for 
> guide
>
> So I have installed puppet 
>
> yum install puppetserver
>
> setup the CA
>
> I can 
> puppet agent --test
> Info: Using configured environment 'production'
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Retrieving locales
> Info: Caching catalog for puppet.yieldbroker.com
> Info: Applying configuration version '1573187965'
> Notice: Applied catalog in 0.01 seconds
>
>
> I have plans of moving to R10K, I had used this before - but stopping 
> using puppet for quite a while.
>
> Now I want to install puppetdb, and I would like to make puppet do it. I 
> am having some difficulty in setting that up.
>
> I don't want to setup puppet master as I believe /etc/puppet will be 
> reconfigure when I install R10K. so I want o use a manual manifest and 
> apply with puppet agent or puppet apply.
>
> So I have this
>
> cat manifest.pp
> node 'puppet' {
>   # Configure puppetdb and its underlying database
>   class { 'puppetdb':
>   }
>   # Configure the Puppet master to use puppetdb
>   class { 'puppetdb::master::config':
>   }
> }
>
>
> when when i run 
>
> puppet apply -v  --noop manifest.pp
> Error: Evaluation Error: Error while evaluating a Resource Statement, 
> Could not find declared class puppetdb (file: 
> /root/puppet/puppetdb/manifest.pp, line: 3, column: 3) on node 
> puppet.yieldbroker.com
>
>
> so whats next, I presume this is because the puppetDB rpm is not install, 
> but chicken egg
>
> So how do I do this ?
>
> A
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5aea9aca-3bdb-48f5-9ada-3fe4fc6d5744%40googlegroups.com.

Reply via email to