Hi Rafael. You would not have any need to create a custom provider.
Depending on which database server you're using and what the end result
that you're trying to achieve is, you can use built-in resource types to do
what you want.

For example, with MS SQL Server, you can evaluate TSQL queries with
https://forge.puppet.com/puppetlabs/sqlserver/types#sqlserver_tsql
And with MySQL, you could use a resource type to instantiate a database
using an .sql file with
https://forge.puppet.com/puppetlabs/mysql/reference#sql
or you could use a Task to arbitrarily execute SQL statements with
https://forge.puppet.com/puppetlabs/mysql/tasks#task_sql

And if all else fails, you could simply use a file resource to put your
file on the node and use an exec to evaluate it.

On Wed, Oct 17, 2018 at 12:06 AM Rafael Tomelin <[email protected]>
wrote:

> Folks,
>
> I was given a task to deploy and update an application via Puppet, yes it
> must be via Puppet at that time. A company has units scattered around the
> world, about 32 units running the same application on different servers.
>
> One of the characteristics is that sometimes there are some types of SQL
> (computer) files and must follow an order:
> new_table.sql
> alter_table_YYMD.sql
> delete_table.sql
> procedure_table.sql
> view_table.sql
>
> In addition, some files are required as system files (js, img, css, php,
> tpl, html), since the directories are already correct.
>
> My biggest problem is in the SQL execution order and then in creating a
> provider.
>
> Ideally, would you create a provider for each type of SQL or one that all
> SQL?
> --
>
> Atenciosamente,
>
> Rafael Tomelin
>
> skype: rafael.tomelin
>
> E-mail: [email protected]
>
> RHCE      - Red Hat Certified Engineer
> PPT-205 - Puppet Certified Professional 2017
> Zabbix    - ZABBIX Certified Specialist
> LPI3
> ITIL v3
>
> --
> 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/CAGEUqbBx17yQa3hVpmf%2BQHvyOFL6dL6PzYwgwHKxiak38ZhmLA%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAGEUqbBx17yQa3hVpmf%2BQHvyOFL6dL6PzYwgwHKxiak38ZhmLA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CACkW_L6TH-kpMENU5wpwhDvP6LQQOY55fS2x1MGvssqGg5Ai6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to