ansible-galaxy-fortiweb-collection's People
Forkers
gianmarco-mameliansible-galaxy-fortiweb-collection's Issues
fortiweb v7.4.3 compatibility issue
Hello,
We are currently working on fortiweb v7.4.3.
This galaxy is no more comaptible with this our version, many playbooks we tried are KO (they are meant to work on v7.0.0-2)
Any informations/raodmap about updates on these playbooks ?
Kind Regards
The readme doesn't identify the ansible_connection
Current README.md content:
[fortiweb]
web01 ansible_host=192.168.1.99 ansible_user="admin" ansible_password="password"
[fortiweb:vars]
ansible_network_os=fortinet.fortiweb.fwebos
ansible_httpapi_use_ssl=yes
ansible_httpapi_validate_certs=no
ansible_httpapi_port=443
The fortiweb:vars also requires the following to be added for it to use the ansible_connection: httpapi
ansible_connection: httpapi
submitting a key and cert using fwebos_certificate_local_import_certificate results in errcode -20020
16 - name: Upload certificate
17 fwebos_certificate_local_import_certificate:
18 action: add
19 vdom: root
20 type: localCertificate
21 certificateFile: ./files/aaphub.local.pem.crt
22 keyFile: ./files/aaphub.local.key.pem
"res": {
"errcode": "-20020",
"message": "The certificate does not match any private key generated on FortiWeb. Please verify that you have the correct certificate file."
}
}
string indices must be integers
I installed the collection :
ansible-galaxy collection install fortinet.fortiweb
I created a hosts file :
[fortiwebs]
fortiweb ansible_host=172.28.0.11 ansible_user="administrateur" ansible_password="j9UPmCMUBRhxNg8pq5QO"
[fortiwebs:vars]
ansible_network_os=fortinet.fortiweb.fwebos
ansible_httpapi_use_ssl=yes
ansible_httpapi_validate_certs=no
ansible_httpapi_port=443
I created a test.yml file :
---
- name:
hosts: all
vars:
connection: httpapi
collections:
- fortinet.fortiweb
gather_facts: false
tasks:
- name: Create
fwebos_virtual_ip:
action: add
name: test4
vip: 5.5.5.5
interface: port4
vdom: root
I launched this command :
ansible-playbook -i hosts test.yml --extra-vars "ansible_user=$ANSIBLE_USER ansible_password=$ANSIBLE_PASSWORD"
My variables came from a library on Azure DevOps.
I have this error :
TASK [Create] ******************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: string indices must be integers
fatal: [fortiweb]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/libexec/platform-python"}, "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 94, in _ansiballz_main\n File \"<stdin>\", line 40, in invoke_module\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_fwebos_virtual_ip_payload_u6mvkpz2/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/modules/fwebos_virtual_ip.py\", line 193, in <module>\n File \"/tmp/ansible_fwebos_virtual_ip_payload_u6mvkpz2/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/modules/fwebos_virtual_ip.py\", line 140, in main\n File \"/tmp/ansible_fwebos_virtual_ip_payload_u6mvkpz2/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/modules/fwebos_virtual_ip.py\", line 116, in param_check\n File \"/tmp/ansible_fwebos_virtual_ip_payload_u6mvkpz2/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/module_utils/network/fwebos/fwebos.py\", line 24, in is_vdom_enable\nTypeError: string indices must be integers\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
The full trace is :
TASK [Create] *******************************************************************************************************************************************************************************************************************************
task path: /home/administrateur/myagent/_work/3/s/test.yml:10
<172.28.0.11> attempting to start connection
<172.28.0.11> using connection plugin httpapi
<172.28.0.11> local domain socket does not exist, starting it
<172.28.0.11> control socket path is /home/administrateur/.ansible/pc/a4fe992474
<172.28.0.11> local domain socket listeners started successfully
<172.28.0.11> loaded API plugin ansible_collections.fortinet.fortiweb.plugins.httpapi.fwebos from path /home/administrateur/.ansible/collections/ansible_collections/fortinet/fortiweb/plugins/httpapi/fwebos.py for network_os fortinet.fortiweb.fwebos
<172.28.0.11>
<172.28.0.11> local domain socket path is /home/administrateur/.ansible/pc/a4fe992474
<fortiweb> Attempting python interpreter discovery
<172.28.0.11> ESTABLISH LOCAL CONNECTION FOR USER: administrateur
<172.28.0.11> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
<172.28.0.11> EXEC /bin/sh -c '/usr/bin/python3.6 && sleep 0'
Using module file /home/administrateur/.ansible/collections/ansible_collections/fortinet/fortiweb/plugins/modules/fwebos_virtual_ip.py
Pipelining is enabled.
<172.28.0.11> EXEC /bin/sh -c '/usr/libexec/platform-python && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "<stdin>", line 102, in <module>
File "<stdin>", line 94, in _ansiballz_main
File "<stdin>", line 40, in invoke_module
File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmp/ansible_fwebos_virtual_ip_payload_i_cukejb/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/modules/fwebos_virtual_ip.py", line 193, in <module>
File "/tmp/ansible_fwebos_virtual_ip_payload_i_cukejb/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/modules/fwebos_virtual_ip.py", line 140, in main
File "/tmp/ansible_fwebos_virtual_ip_payload_i_cukejb/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/modules/fwebos_virtual_ip.py", line 116, in param_check
File "/tmp/ansible_fwebos_virtual_ip_payload_i_cukejb/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/module_utils/network/fwebos/fwebos.py", line 24, in is_vdom_enable
TypeError: string indices must be integers
fatal: [fortiweb]: FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/libexec/platform-python"
},
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 94, in _ansiballz_main\n File \"<stdin>\", line 40, in invoke_module\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_fwebos_virtual_ip_payload_i_cukejb/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/modules/fwebos_virtual_ip.py\", line 193, in <module>\n File \"/tmp/ansible_fwebos_virtual_ip_payload_i_cukejb/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/modules/fwebos_virtual_ip.py\", line 140, in main\n File \"/tmp/ansible_fwebos_virtual_ip_payload_i_cukejb/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/modules/fwebos_virtual_ip.py\", line 116, in param_check\n File \"/tmp/ansible_fwebos_virtual_ip_payload_i_cukejb/ansible_fwebos_virtual_ip_payload.zip/ansible_collections/fortinet/fortiweb/plugins/module_utils/network/fwebos/fwebos.py\", line 24, in is_vdom_enable\nTypeError: string indices must be integers\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.