Streamline path, prevent file from being written before volume is mounted
This commit is contained in:
parent
f8c23f16d5
commit
37465492a9
@ -87,7 +87,7 @@ write_files:
|
|||||||
}
|
}
|
||||||
owner: root:root
|
owner: root:root
|
||||||
permissions: '0644'
|
permissions: '0644'
|
||||||
- path: /mnt/data/kibana-elasticsearch-password
|
- path: /opt/cloud-init-misc-data/kibana_elasticsearch_password
|
||||||
content: ${kibana_elasticsearch_password}
|
content: ${kibana_elasticsearch_password}
|
||||||
owner: root:root
|
owner: root:root
|
||||||
permissions: '0600'
|
permissions: '0600'
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
printf "Setting up Kibana user\n"
|
printf "Setting up Kibana user\n"
|
||||||
curl -uelastic:changeme -XPUT -H 'Content-Type: application/json' 'http://10.0.1.51:9200/_xpack/security/user/kibana/_password' -d "{ \"password\":\"$(head -n 1 /mnt/data/kibana-elasticsearch-password)\"}"
|
curl -uelastic:changeme -XPUT -H 'Content-Type: application/json' 'http://10.0.1.51:9200/_xpack/security/user/kibana/_password' -d "{ \"password\":\"$(head -n 1 /opt/cloud-init-misc-data/kibana_elasticsearch_password)\"}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.kibana.enable = true;
|
services.kibana.enable = true;
|
||||||
@ -37,7 +37,7 @@
|
|||||||
services.kibana.listenAddress = "0.0.0.0";
|
services.kibana.listenAddress = "0.0.0.0";
|
||||||
services.kibana.elasticsearch.hosts = [ "http://10.0.1.51:9200" ];
|
services.kibana.elasticsearch.hosts = [ "http://10.0.1.51:9200" ];
|
||||||
services.kibana.elasticsearch.username = "kibana";
|
services.kibana.elasticsearch.username = "kibana";
|
||||||
services.kibana.elasticsearch.password = (builtins.readFile /mnt/data/kibana-elasticsearch-password);
|
services.kibana.elasticsearch.password = (builtins.readFile /opt/cloud-init-misc-data/kibana_elasticsearch_password);
|
||||||
|
|
||||||
system.activationScripts = {
|
system.activationScripts = {
|
||||||
mnt = {
|
mnt = {
|
||||||
|
Loading…
Reference in New Issue
Block a user