0

GLPI Headless mode installation

aloo 3 months ago updated by Curtis Conard 3 weeks ago 6

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.

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,

+1

bin/console --version