There are a few resolution methods: Method #1: Copy the lightos_jwt file from the Ansible server (by default the file will be stored in the /root/ folder to the Lightbits servers). Run the command source lightos_jwt.
This will set the JWT string to an environment variable called “LIGHTOS_JWT”. Run lbcli commands by adding “-J $LIGHTOS_JWT” to the command parameters.
Method #2: Copy the JWT string from the lightos_jwt file on the Ansible server (the string after “export LIGHTOS_JWT=”). Add the following line to the /etc/lbcli/lbcli.yaml file:
jwt: <The JWT string copied in #1 above>.
Save the modified file. Now you can use the lbcli without the “-J” flag.
Method #3: Copy the JWT string from the lightos_jwt file on the Ansible server (the part after “export LIGHTOS_JWT=”). You can use the lbcli with the “-J” flag, followed by the string copied from item #1 above.
|