
0
GLPI Headless mode installation
To be able to fully install GLPI using Config as Code tools like Ansible, I suggest adding a feature to be able to install GLPI in a headless mode.
The idea is to automate the GUI setup process in a headless mode script.
I can contribute to this one.
I'm not a PHP developer, but I can automate the process if an API is provided.
Thanks.
Customer support service by UserEcho
This is already possible using the GLPI CLI using the "database:install" command.
https://glpi-user-documentation.readthedocs.io/fr/latest/cli.html#glpi-database-install
Same for update using "database:update".
https://glpi-user-documentation.readthedocs.io/fr/latest/cli.html#glpi-database-update
You can see them in use in the WIP official GLPI docker:
https://github.com/glpi-project/docker-images/blob/main/glpi/files/opt/install.sh
Thanks, I'll try it out and let you know.
Maybe an additional option "-Y|--yes" to autoconfirm the installation?
I know this might be wanted as an autoconfirmation can be risky, especially when upgrading/reconfiguring.
But the user is master of his installation.
The option can be very handy with automation and Config as Code tool.
Try "--no-interaction". It is a Symfony Console parameter which isn't reflected in the CLI command documentation, but it does show if you do "bin/console help".
Is there a way to get the current installed version using the CLI?
I've tried
```bash
su www-data -s /bin/bash -c "bin/console system:status --format json --private"
```
```json
{
"glpi": {
"status": "OK"
},
"db": {
"status": "OK",
"master": {
"status": "OK"
},
"slaves": {
"status": "NO_DATA",
"servers": []
},
"main": {
"status": "OK"
},
"replicas": {
"status": "NO_DATA",
"servers": []
}
},
"cas": {
"status": "NO_DATA"
},
"ldap": {
"status": "NO_DATA",
"servers": []
},
"imap": {
"status": "NO_DATA",
"servers": []
},
"mail_collectors": {
"status": "NO_DATA",
"servers": []
},
"crontasks": {
"status": "OK",
"stuck": [],
"status_msg": "RUNNING: 0, STUCK: 0, TOTAL: 41"
},
"filesystem": {
"status": "OK",
"session_dir": {
"status": "OK"
}
},
"plugins": {
"status": "NO_DATA"
}
}
```
thanks,
bin/console --version