Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: improve help text for actions

...

Please note, that credential sets can also be managed in the opConfig GUI or in the API

 opconfig-cli.pl act=list_credential_sets [name=Y'set name']
 opconfig-cli.pl act=create_credential_set file=Y'file path.json'
 opconfig-cli.pl act=update_credential_set name=Y 'set name' file=Y'file path.json'
 opconfig-cli.pl act=delete_credential_sets set name=Y
'set name'
 opconfig-cli.pl act=assign_credential_set name=Y 'set name' node=YnodeX

List Credential Sets

List all the credential sets in json format:

Code Block
languagebash
/usr/local/omk/bin/opconfig-cli.pl act=list-credential-sets
debug=1
{
   "testapi" : {
      "always_privileged" : "0",
      "description" : "new descript4",
      "lastupdate" : 1645085578,
      "password" : "*****",
      "password_privileged" : "*****",
      "setname" : "testapi",
      "ssh_key" : "",
      "username" : "nmis"
   },
   "ubu" : {
      "always_privileged" : "0",
      "description" : "test",
      "lastupdate" : 1643796740,
      "password" : "*****",
      "password_privileged" : "*****",
      "setname" : "ubu",
      "ssh_key" : "",
      "username" : "test"
   }
}

...

Code Block
/usr/local/omk/bin/opconfig-cli.pl act=list-credential-sets debug=1 name=asgard

{
   "always_privileged" : "0",
   "description" : "",
   "lastupdate" : 1631098471,
   "password" : "*****",
   "password_privileged" : "*****",
   "setname" : "asgard",
   "ssh_key" : "",
   "username" : "admin"
}

...

Code Block
/usr/local/omk/bin/opconfig-cli.pl act=create-credential-set file=/tmp/credset.json  debug=1 

Example of credset.json file: 

...

At least password, privileged password or SSH Key are required. 

Update Credential Set

Create Update a new credential set with a file in json format containing the credential set information. 

Code Block
/usr/local/omk/bin/opconfig-cli.pl act=update-credential-set file=/tmp/credset.json name=mycredset debug=1 

Example of credset.json file: 

...

Code Block
/usr/local/omk/bin/opconfig-cli.pl act=delete-credential-set name=mycredset debug=1 


Assign Credential Set

Assign a credential set to a node:

Code Block
/usr/local/omk/bin/opconfig-cli.pl act=assign-credential-set name=mycredset node=mynode debug=1