-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fortigate firewall firmware upgrade using fortios_monitor module #308
Comments
Hi @giggsitx , Thank you for bringing this to my attention. I've executed your script and it appears to be functioning perfectly. I was wondering if you're currently utilizing the latest version of Ansible FOS, specifically "fortinet.fortios:2.3.6"? Additionally, could you please consider enabling the debug feature on the FGT? This would greatly assist us in collecting log information for further investigation. Below is the CLI command to enable the debug session on the FGT:
Thanks, |
hi @MaxxLiu22, i am currently using ansible tower to execute this playbook inside a template, may i know is there any other way to check this? from what i see from the debug, it shows that the playbook run completely fine, but the version did not change or do you think i should use other module like fortios_system_device_upgrade |
Hi @giggsitx , Apologies for the delayed response. May I ask if the issue is still occurring? You might want to check the logs via GUI -> Log & Report -> System Events to gather more details about what happened during the upgrade process. |
Hi Jie, I have been working for days and can't seems to upgrade firmware on fortigate firewall. Below is my playbook task and error. Ansible tower shows that job has been run successfully but devices not upgraded.
tasks:
- name: Firmware Upgrade
fortios_monitor:
access_token: "{{ access_token }}"
vdom: "{{ vdom }}"
enable_log: "true"
selector: 'upgrade.system.firmware'
params:
source: "upload"
filename: "{{ file_name }}"
file_content: "{{ lookup('file', './FGT_81F-v7.2.6.F-build1575-FORTINET.out') | b64encode }}"
register: upgrade_result
error:
ok: [10.5.100.254] => {
"msg": "Firmware upgrade status: {'changed': False, 'meta': {'http_method': 'POST', 'results': {'status': 'error', 'error': {'message': '-585', 'code': -585}, 'file_id': '7DrJlM'}, 'vdom': 'root', 'path': 'system', 'name': 'firmware', 'action': 'upgrade', 'status': 'success', 'serial': 'FGT81FTK23008396', 'version': 'v7.0.12', 'build': 523}, 'failed': False}"
}
The text was updated successfully, but these errors were encountered: