Configuring the CLI¶
Where is stateful configuration stored?¶
The F5 CLI stores configuration settings and credentials in the user’s home directory inside a folder called
.f5_cli. There are a number of files in this folder. Below you can see a description for each of these files and an example of information typically found in each one.
auth.yaml - Authentication information such as credentials used by the CLI
- name: bigip1 host: 192.0.2.10 authentication-type: bigip password: mypassword1 port: 443 username: myuser1 default: true - name: bigip2 host: 192.0.2.11 authentication-type: bigip password: mypassword2 port: 443 username: myuser2 default: false - name: cs1 password: mypassword3 authentication-type: cs username: firstname.lastname@example.org default: true
config.yaml - Configuration settings used by the CLI
Typically changing configuration settings in these files is done using the F5 CLI directly, however for advanced use cases it may be a requirement to change the settings directly in these files.
Configuring credentials via environment variables¶
The F5 CLI reads credentials via environment variables if all the required information to login exists then the environment variable credentials will take precedence. The variables can be configured as follows:
# Credentials for cloud services export F5_CS_USERemail@example.com'; export F5_CS_PASSWORD='password'; export F5_CS_API_ENDPOINT='endpoint'; # optional # Credentials for bigip export F5_BIGIP_USER='admin'; export F5_BIGIP_PASSWORD='password'; export F5_BIGIP_HOST='192.0.2.1'; export F5_BIGIP_PORT='8443'; # optional # Credentials for bigiq export F5_BIGIQ_USER='admin'; export F5_BIGIQ_PASSWORD='password'; export F5_BIGIQ_HOST='192.0.2.1'; export F5_BIGIQ_PORT='8443'; # optional
The F5 CLI is currently in early development and we want to hear from you! To provide feedback on F5 CLI or this documentation, you can file a GitHub Issue.