Skip to content

Commit

Permalink
Merge pull request #585 from poloz-lab/fix-574-indexer-security-init
Browse files Browse the repository at this point in the history
Fix indexer security init execution
  • Loading branch information
teddytpc1 authored Oct 12, 2022
2 parents d7c5bcc + a9a6ea0 commit fb3f73c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions manifests/indexer.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
$indexer_path_data = '/var/lib/wazuh-indexer',
$indexer_path_logs = '/var/log/wazuh-indexer',
$indexer_path_certs = '/etc/wazuh-indexer/certs',
$indexer_security_init_lockfile = '/var/tmp/indexer-security-init.lock',

$indexer_ip = 'localhost',
$indexer_port = '9200',
Expand Down Expand Up @@ -134,10 +135,9 @@
}

exec { 'Initialize the Opensearch security index in Wazuh indexer':
path => ['/usr/bin', '/bin', '/usr/sbin'],
command => '/usr/share/wazuh-indexer/bin/indexer-security-init.sh',
refreshonly => true, # only run when package is installed or updated
subscribe => Package['wazuh-indexer'],
require => Service['wazuh-indexer'],
path => ['/usr/bin', '/bin', '/usr/sbin'],
command => "/usr/share/wazuh-indexer/bin/indexer-security-init.sh && touch ${indexer_security_init_lockfile}",
creates => $indexer_security_init_lockfile,
require => Service['wazuh-indexer'],
}
}

0 comments on commit fb3f73c

Please sign in to comment.