Skip to main content

Running command for multiple systems

OneCLI supports to run some commands in out-of-band mode for multiple systems by using the file containing user input systems information. Before you begin, add the BMC information to the target systems by referring to the sample file Sample/multi_task_config.json.

Run commands through encrypted target system password

Note
If you have saved the password for the target systems using the encrypt command, set password_decrypt_mode as 1 in the configuration file for multi commands.
  1. Prepare the credential configuration file. Input the hostname/IP, user name, and password of the target systems and run the following command to encrypt the password. Remove the credential configuration file after the encryption. The password will be saved in all target systems.

    OneCli encrypt --configfile credentials_config.json --unattended
    Note
    For more information, refer to encrypt command.
  2. Prepare the multi configuration file containing the managed systems information, and ensure that "password_decrypt_mode": 1. Input the hostname/IP and user name of the target systems and run the following command. OneCLI will obtain the password from the saved encrypted file.

    OneCli multiospower reboot --configfile multi_task_config.json

Run commands through interactive password

  1. Prepare the multi configuration file and ensure that "password_decrypt_mode": 0.

  2. Run the following command:
    OneCli multiospower reboot --configfile multi_task_config.json

    The output is:

    Enter password for default_alias(USERID):
  3. Input the password for specified user names in the configuration file.