GVM Scripts for scanner configuration
To automate creation for credentials, targets and task as well as other “housekeeping” stuff, these scripts might be of assistance.
Hope it helps.
https://github.com/martinboller/greenbone-gmp-scripts
They’re all (ugly) derivatives of the code provided with gvm-tools.