mozilla / http-observatory

Mozilla HTTP Observatory
https://observatory.mozilla.org/
Mozilla Public License 2.0
1.86k stars 170 forks source link

Integration with Ansible? #539

Open ildjarnisdead opened 1 month ago

ildjarnisdead commented 1 month ago

Hello,

Has anyone got this working with Ansible? I tried installing this in an Ansible EE, but the httpobs.scanner module isn't found

The Ansible-builder execution-environment.yml I used:

---
version: 3
images:
  base_image:
    name: quay.io/fedora/python-311:311
dependencies:
  ansible_core:
    package_pip: ansible-core>=2.15.0rc2,<2.16
  ansible_runner:
    package_pip: ansible-runner
  python: |
    poetry
  system: |
    python3.11-devel [platform:rpm compile]
    git [platform:rpm]
    postgresql-devel [platform:rpm]
    gcc [platform:rpm]
additional_build_steps:
  append_base:
    - RUN $PYCMD -m pip install -U pip
  append_final:
    - RUN git clone https://github.com/mozilla/http-observatory.git && cd http-observatory && poetry install --no-interaction
ildjarnisdead commented 1 month ago

The YAML file used: obsscan.txt

The module used: httpobs.txt

The error:

Traceback (most recent call last):
  File "/runner/.ansible/tmp/ansible-tmp-1725948858.415321-22-27630340840587/AnsiballZ_httpobs.py", line 107, in <module>
    _ansiballz_main()
  File "/runner/.ansible/tmp/ansible-tmp-1725948858.415321-22-27630340840587/AnsiballZ_httpobs.py", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/runner/.ansible/tmp/ansible-tmp-1725948858.415321-22-27630340840587/AnsiballZ_httpobs.py", line 47, in invoke_module
    runpy.run_module(mod_name='ansible.modules.httpobs', init_globals=dict(_module_fqn='ansible.modules.httpobs', _modlib_path=modlib_path),
  File "<frozen runpy>", line 226, in run_module
  File "<frozen runpy>", line 98, in _run_module_code
  File "<frozen runpy>", line 88, in _run_code
  File "/tmp/ansible_httpobs_payload_zfea20u0/ansible_httpobs_payload.zip/ansible/modules/httpobs.py", line 60, in <module>
ModuleNotFoundError: No module named 'httpobs'