On Oct 31, 1:05 pm, Dan Bode <d...@puppetlabs.com> wrote:
> On Mon, Oct 31, 2011 at 10:55 AM, treydock <treyd...@gmail.com> wrote:
>
> > On Oct 31, 12:26 pm, Dan Bode <d...@puppetlabs.com> wrote:
> > > you are running into a documentation issue. All of the configuration was
> > > moved to a new parameter called: config_hash. I can submit a patch
>
> > > On Mon, Oct 31, 2011 at 10:01 AM, treydock <treyd...@gmail.com> wrote:
> > > > I'm working to begin managing MySQL with the puppetlabs-mysql provided
> > > > module, but am not able to get very far with the README documentation.
>
> > > > So far, simply trying to add the server module and define the
> > > > root_password is failing like so,
>
> > > > err: Could not retrieve catalog from remote server: Error 400 on
> > > > SERVER: Invalid parameter root_password at /etc/puppet/manifests/
> > > > nodes.pp:882 on node puppetnode1.tld
>
> > > > The definition looks like this,
>
> > > > node 'puppetnode1.tld' {
>
> > > >    class { 'mysql::server':
> > > >        root_password   => 'test'
> > > >    }
>
> > > should be changed to:
>
> > >  class { 'mysql::server':
> > >        config_hash => { root_password   => 'test'}
> > >    }
>
> > > >    database_user { 'treydock@localhost':
> > > >        password_hash   => mysql_password('pass')
> > > >    }
>
> > >    database_grant { 'treydock@localhost/*':
>
> > > >        privileges  => ['ALL'],
> > > >    }
>
> > > >    mysql::db { 'zabbix':
> > > >        user        => 'zabbix',
> > > >        password    => 'zabbix',
> > > >        host        => 'localhost',
> > > >        grant       => ['ALL'],
> > > >    }
>
> > > > }
>
> > > > The database_user and _grant thus far haven't actually done anything.
> > > > I'm assuming it's because mysql::server isn't working or being
> > > > applied.
>
> > > > There's likely something very obvious I'm missing.  This is also my
> > > > first time using parameterized classes.
>
> > > > Thanks
> > > > - Trey
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Puppet Users" group.
> > > > To post to this group, send email to puppet-users@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > puppet-users+unsubscr...@googlegroups.com.
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/puppet-users?hl=en.
>
> > Ah that was it!  Thanks.
>
> > Is there a way to similuate or run the equivilant of
> > "mysql_secure_installation" within this module?  I tried an initial
> > attempt with the following...but once it's added to the mysql::server
> > class it never seems to get called...
>
> what failed? How did you add it to the mysql::server class?
>
>
>
>
>
>
>
>
>
> > class mysql::server::secure {
>
> >    database_user {
> >        "''":
> >            ensure        => absent,
> >            require       => Service['mysqld'];
>
> >        "root@${fqdn}":
> >            ensure        => absent,
> >            require       => Service['mysqld'];
> >    }
>
> >    database {
> >        "test":
> >            ensure  => absent,
> >            require => Service['mysqld'];
> >    }
>
> > }
>
> > Would the easier route be to just modify the mysql_secure_installation
> > script to be more puppet friendly?
>
> > Thanks
> > - Trey
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Puppet Users" group.
> > To post to this group, send email to puppet-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > puppet-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/puppet-users?hl=en.

It didn't fail, it just simply did nothing.

This is it's inclusion in mysql::server


class mysql::server(
  $service_name = $mysql::params::service_name,
  $config_hash  = {},
  $package_name = 'mysql-server'
) inherits mysql::params {

    include mysql::server::secure

  # automatically create a class to deal with
  # configuration
  $hash = {
    "mysql::config" => $config_hash
  }


I am doing it via Exec now anyways.  Though I'd prefer to do it with
the new type and provider

- Trey

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to