phoenixnap / phoenixnap.bmc / 1.17.0 / module / ssh_key_info Gather information about phoenixNAP BMC SSH Keys | "added in version" 0.7.0 of phoenixnap.bmc" Authors: Pavle Jojkic (@pajuga) <pavlej@phoenixnap.com>, Goran Jelenic (@goranje) <goranje@phoenixnap.com> preview | supported by certifiedphoenixnap.bmc.ssh_key_info (1.17.0) — module
Install with ansible-galaxy collection install phoenixnap.bmc:==1.17.0
collections: - name: phoenixnap.bmc version: 1.17.0
Gather information about ssh keys available.
This module has a dependency on requests
# All the examples assume that you have file config.yaml with your 'clientId' and 'clientSecret' # in location: ~/.pnap/config.yaml - name: List all SSH keys hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: List all SSH keys information for account phoenixnap.bmc.ssh_key_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" register: output - name: Print the gathered infos ansible.builtin.debug: var: output.ssh_keys
- name: List the SSH key details hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: List SSH keys information based on the specified names phoenixnap.bmc.ssh_key_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" names: [default-key] register: output - name: Print the gathered infos ansible.builtin.debug: var: output.ssh_keys
names: description: SSH key names that represent an SSH keys elements: str type: list client_id: description: Client ID (Application Management) type: str client_secret: description: Client Secret (Application Management) type: str
ssh_keys: contains: createdOn: description: Date and time of creation. returned: always sample: '2020-03-19T16:39:00Z' type: str default: description: Keys marked as default are always included on server creation and reset unless toggled off in creation/reset request. returned: always sample: true type: bool fingerprint: description: SSH key auto-generated SHA-256 fingerprint. returned: always sample: iL4k5YTrOnzvlxFMN+WU4BPI/QqrMcvvhU0xlfeMwZI type: str id: description: The unique identifier of the SSH key.. returned: always sample: 5fa54d1e91867c03a0a7b4a4 type: str key: description: SSH key value. returned: always sample: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDF9LdAFElNCi... type: str lastUpdatedOn: description: Date and time of last update. returned: always sample: '2020-03-19T16:39:00Z' type: str name: description: Friendly SSH key name to represent an SSH key. returned: always sample: sshkey-name-01 type: str description: The SSH key information as list returned: success type: complex