diff --git a/manifests/init.pp b/manifests/init.pp index 200e54b66e6c4d8361246d76c57884c6f75e20ac..3abc787d42dc2af95b19a636b40fe0037d8e37a7 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -32,21 +32,28 @@ class comptoir ( # TODO 1. add an 'onlyif' statement to Exec (for instance COMPTOIR_create_DB_tables_and_procedures.sh is executable) # TODO 2. improve puppet code to avoid Exec, # TODO 3. ...maybe by creating an idempotent SQL, see https://stackoverflow.com/questions/33631186/how-do-i-make-alter-column-idempotent - -> Exec { 'Create SQL tables & procedures': - command => "${comptoir_dir}/bin/COMPTOIR_create_DB_tables_and_procedures.sh -d ${comptoir_dir}", - cwd => $comptoir_dir, - user => $comptoir_user, - environment => [ 'HOME=/home/comptoir' ], - } + # -> Exec { 'Create SQL tables & procedures': + # command => "${comptoir_dir}/bin/COMPTOIR_create_DB_tables_and_procedures.sh -d ${comptoir_dir}", + # cwd => $comptoir_dir, + # user => $comptoir_user, + # environment => [ 'HOME=/home/comptoir' ], + # } - # Install app with Composer - -> Exec { 'Install app with Composer': - command => '/usr/local/bin/composer --no-progress install', - cwd => $comptoir_dir, - user => $comptoir_user, - environment => [ 'HOME=/home/comptoir' ], - timeout => 600, # doubled default value which is 300s + postgresql_psql { 'Create SQL tables & procedures': + command => '\d', + # cwd => '', + db => 'comptoir', # TODO set this as a parameter + psql_user => 'comptoir', # TODO set this as a parameter } + # # Install app with Composer + # -> Exec { 'Install app with Composer': + # command => '/usr/local/bin/composer --no-progress install', + # cwd => $comptoir_dir, + # user => $comptoir_user, + # environment => [ 'HOME=/home/comptoir' ], + # timeout => 600, # doubled default value which is 300s + # } + # }