#fetch onboard security key manager backup output

1 messages · Page 1 of 1 (latest)

woeful imp
#

Hi Experts,

I am trying to fetch the onbaord key manager backup output. i am bale to fetch it but the output is like a single line and not on the requred format how it shows on the actual ontap cli.
how can i get the output in same format as ontap cli?

- name: Fetch encrypted backup output for onboard key manager on {{ fc_desti_hostname }}      
  netapp.ontap.na_ontap_rest_info:
    <<: *login      
    gather_subset:
      - security/key-managers
    fields:
      - enabled
      - onboard
    use_python_keys: true
  delegate_to: localhost
  register: ontap
- debug: var=ontap
lucid glen
#

@woeful imp The formatting is the only issue or you are not getting expected result?

woeful imp
#

formatting is the only issue.. like it dosent display like a key format and its all on continues line

#

@lucid glen : i used the workaround as below. but if there is any better way.. feel free to suggest

neat torrent
#

We are looking on the same topic. Would it be possible to extend the key manager module with this?

lucid glen
#

Could you please try this
- name: Fetch encrypted backup output for onboard key manager on {{ fc_desti_hostname }}
netapp.ontap.na_ontap_command:
<<: login
command: ['security', 'key-manager', 'onboard', 'show-backup']
delegate_to: localhost
register: ontap_backup

- name: Display backup key in CLI format
  debug:
    var: ontap_backup.msg
woeful imp
#

@lucid glen : I have used netapp.ontap.na_ontap_command module already but this one uses ZAPI and its going to get depreciated soon rite?