Skip to content
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

fortios_facts only exposes system facts #41

Closed
sbraz opened this issue Aug 5, 2020 · 7 comments
Closed

fortios_facts only exposes system facts #41

sbraz opened this issue Aug 5, 2020 · 7 comments
Labels
enhancement New feature or request FactGathering

Comments

@sbraz
Copy link

sbraz commented Aug 5, 2020

Hello,
I would like to add policies and VIPs to my firewall but for that I need to be able to gather facts about the network configuration.

However fortios_facts only exposes system facts. Is that expected?

@JieX19
Copy link

JieX19 commented Aug 6, 2020

Hi @sbraz,

Yes, fortios_facts currently supports system facts only. We will expand the range of facts gathering in the future. If possible, can you please paste your playbook so that we can help you solve the problem?

Thanks,
Jie

@sbraz
Copy link
Author

sbraz commented Aug 7, 2020

Hi Jie,
I don't know exactly what my colleague tries to achieve but I think it has to do with adding a firewall rule only if other similar rules do not exist. Therefore, we need to list existing firewall policies.

@chillancezen chillancezen added the enhancement New feature or request label Aug 14, 2020
@mbdraks
Copy link

mbdraks commented Aug 19, 2020

Link,

If we implement a 'get' option (similar to what we have for FortiManager modules) we could solve all the 'check config before doing something' cases (at least considering the CMDB API) and focus the get_facts modules to collect info only available with the 'monitor' API.

What do you think?

@chillancezen
Copy link

@mbdraks @sbraz

hi Michel, Louis,
FortiOS now has limited support to gather facts:
https://ansible-galaxy-fortios-docs.readthedocs.io/en/latest/gen/fortios_facts.html

In our next major FortiOS release, we are going to enhance this module to include more.
and will consider full monitor APIs as well.

thanks,
Link

@sbraz
Copy link
Author

sbraz commented Aug 20, 2020

Hi Jie,
Thanks for the answer. I have a few questions.

In our next major FortiOS release, we are going to enhance this module to include more.
and will consider full monitor APIs as well.

Does that mean this is a server-side (API) limitation and that we will need to wait until FortiOS 6.6 is released?

How do you guys use Ansible to add firewall rules if you can't list existing policies? I'm still surprised that there is no way to do this and I don't really understand how the Ansible module could be used in production at the moment if it lacks this feature.

@chillancezen
Copy link

Does that mean this is a server-side (API) limitation and that we will need to wait until FortiOS 6.6 is released?
No, I mean next FortiOS Ansible Collection release, sorry for confusion.

this is also not api limitation, the module is manually written by Don, only limited cases are covered.

How do you guys use Ansible to add firewall rules if you can't list existing policies? I'm still surprised that there is no way to do this and I don't really understand how the Ansible module could be used in production at the moment if it lacks this feature.

sorry for the inconvenience, we have generic module to mitigate any discovered functions.
https://github.com/fortinet/ansible-fortios-generic

Thanks,
Link

@chillancezen
Copy link

hi @sbraz @mbdraks ,
we have all configuration API GET methods supported in latest releases.
https://ansible-galaxy-fortios-docs.readthedocs.io/en/latest/fact.html

and we are going to support GET methods for all monitor APIs in next major release.

now I mark this issue closed, please feel free to reopen it in case further support is needed.
thanks,
Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request FactGathering
Projects
None yet
Development

No branches or pull requests

4 participants