brocade / ansible

55 stars 33 forks source link

brocade_security_security_certificate_action import cert fails #149

Open pda79 opened 7 months ago

pda79 commented 7 months ago

brocade collection 1.3.3 dcx Fabric OS: v9.2.0a

when we try to use ansible collection for importing certs, the command an error "Chassis is not ready for management"

log_ansible.txt

the import works fine when we use rest api with the same parameter

prasad-valmeti-broadcom commented 5 months ago

Could you please share the playbook that you are using?

user**server_name**/csrscpcerthttpscert_name.pemimport

Is this server_name is correct? Is it reproducible always? or happening intermittently?

pda79 commented 4 months ago

Hi, Here is the piece of code which return the error:

- name: "Certificat import"
  brocade.fos.brocade_security_security_certificate_action:
    credential: "{{credential}}"
    vfid: -1
    action_inputs: "{{action_inputs}}"
  vars:
    action_inputs:
      remote_user_name: user
      remote_host_ip: server_name
      remote_directory: /csr
      protocol: scp
      certificate_entity: cert
      certificate_type: https
      certificate_name: cert_name.pem
      operation: import

it is always reproductible and i have made test on 2 differents gen7 switch with the same fos version

prasad-valmeti-broadcom commented 2 months ago

I tried this with cert_install.yml playbook that is available in the collection. It is working fine in Ansible FOS 1.3.3 with 9.2 FOS release. Please replace your values in that playbook and run. If possible, the playbook output will help to analyze the issue properly. ansible-playbook -i san-inventory cert_install.yml -vvvv

pda79 commented 2 months ago

I have made some other tests and i already have the issue. here is the output of the result running the playbook with -vvvv FOS v9.2.0a brocade fos collection version 1.3.3

job_1277243.txt