ora_install::database{ 'ora_install':
  oracle_base               => '/oracle',
  oracle_home               => '/oracle/product/12.1/db',
  version                   => '12.1',
  user                      => 'oracle',
  group                     => 'dba'
  download_dir              => '/install',
  action                    => 'create',
  db_name                   => 'orcl',
  db_domain                 => 'example.com',
  sys_password              => 'Welcome01',
  system_password           => 'Welcome01',
  character_set             => 'AL32UTF8',
  nationalcharacter_set     => 'UTF8',
  sample_schema             => 'FALSE',
  memory_percentage         => '40',
  memory_total              => '800',
  database_type             => 'MULTIPURPOSE',
  em_configuration          => 'NONE',
  data_file_destination     => '/oracle/oradata',
  recovery_area_destination => '/oracle/flash_recovery_area',
  init_params               => {'open_cursors'        => '1000',
                                'processes'           => '600',
                                'job_queue_processes' => '4' },
  container_database        => true,   <|-------
}

ora_install::database_pluggable{'pdb1':
  ensure                   => 'present',
  version                  => '12.1',
  oracle_home_dir          => '/oracle/product/12.1/db',
  user                     => 'oracle',
  group                    => 'dba',
  source_db                => 'orcl',
  pdb_name                 => 'pdb1',
  pdb_admin_username       => 'pdb_adm',
  pdb_admin_password       => 'Welcome01',
  pdb_datafile_destination => "/oracle/oradata/orcl/pdb1",
  create_user_tablespace   => true,
  log_output               => true,
}

# remove the pluggable database
ora_install::database_pluggable{'pdb1':
  ensure                   => 'absent',
  version                  => '12.1',
  oracle_home_dir          => '/oracle/product/12.1/db',
  user                     => 'oracle',
  group                    => 'dba',
  source_db                => 'orcl',
  pdb_name                 => 'pdb1',
  pdb_datafile_destination => "/oracle/oradata/orcl/pdb1",
  log_output               => true,
}

or delete a database

ora_install::database{ 'testDb_Delete':
  oracle_base             => '/oracle',
  oracle_home             => '/oracle/product/11.2/db',
  user                    => 'oracle',
  group                   => 'dba',
  download_dir            => '/install',
  action                  => 'delete',
  db_name                 => 'test',
  sys_password            => 'Welcome01',
  require                 => Ora_install::Dbactions['start testDb'],
}