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

fmgr_pm_pkg_adom Can't Delete Package - State is considered an unsupported parameter #18

Closed
rrobles12 opened this issue Jan 27, 2021 · 3 comments

Comments

@rrobles12
Copy link

The issue is present with the following modules:
fmgr_pm_pkg_adom
fmgr_pm_pkg
fmgr_pm_pkg_global

Trying to delete a package and the documentation here states:

To create or update an object, use state: present directive.
To delete an object, use state: absent directive

I try this even though it is not listed in the example and I get the following error message:

"Unsupported parameters for (fmgr_pm_pkg) module: state Supported parameters include: adom, bypass_validation, pkg_path, pm_pkg, rc_failed, rc_succeeded, workspace_locking_adom, workspace_locking_timeout"}

I've also tried under pkg_path but the same error occurs. Where am I suppose to put the state section? This is true for all the modules listed above.

Playbook:

  tasks:
  - name: DELETE POLICY PACKAGE
    fmgr_pm_pkg:
      adom: "{{ adom }}"
      pkg_path: "{{ pkg }}"
      state: absent
      pm_pkg:
        name: "{{ pkg }}"
ansible --version
ansible 2.10.5

ansible-galaxy collection list
Collection            Version
--------------------- -------
ansible.netcommon     1.2.1
fortinet.fortimanager 2.0.1

@chillancezen
Copy link

Good Issue. will take look into it.
ETA: Feb 5

@chillancezen
Copy link

the fix will be included in FMG galaxy collection 2.0.3.
IT WILL BE RELEASED IN A FEW DAYS.

see document for more: https://ansible-galaxy-fortimanager-docs.readthedocs.io/en/galaxy-2.0.3/faq.html#modules-for-policy-package

@chillancezen
Copy link

2.0.3 has been released.
install it by ansible-galaxy collection install -fn fortinet.fortimanager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants