Ansible error while installing pulp (postgres_log_dir undefined)

Hi, I’m new to pulp and am installing based on the ansible roles as documented at Getting started - Pulp Installer. During the install, I get this error:

TASK [geerlingguy.postgresql : Define postgresql_log_dir.] *********************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an 
undefined variable. The error was: 'dict object' has no attribute 
'log_directory'\n\nThe error appears to be in 
'/root/.ansible/roles/geerlingguy.postgresql/tasks/variables.yml': line 58, 
column 3, but may\nbe elsewhere in the file depending on the exact syntax 
problem.\n\nThe offending line appears to be:\n\n\n- name: Define 
postgresql_log_dir.\n  ^ here\n"}

I’m wondering if anyone else has seen this yet?

I think perhaps this was fixed in https://github.com/pulp/pulp_installer/pull/1243, but the fix hasn’t been released yet?

I worked around this for now by pinning geerlingguy.postgresql to version 3.3.1.

Sorry about that, I should have done a release as soon as I fixed it.

I released pulp_installer 3.20.1 with the fix. You can keep your workaround in the meantime.

I’m trying to install galaxy-ng using the installation using the installation guide. I installed the collections and downloaded the example. Running the playbook ansible-playbook enduser-install.yml -i hosts --extra-vars "@enduser-install-vars.yml" I’m getting an error on TASK [geerlingguy.postgresql : Define postgresql_log_dir.]. I’ve tried it with various versions. Does anyone have any suggestions? Thanks

That def sounds like https://github.com/pulp/pulp_installer/issues/1242 - but that was fixed in the pulp-installer last summer. I am not a galaxy-expert however, not sure which gears could be broken here.

Thanks @ggainey I’m going to install pulp first then try to install galaxy-ng

@Tom was pointed out I wasn’t reading carefully - can you post the actual error recorded in that task? “Define postgresql_log_dir” is just the name of the failing task (I think, anyway)

I went ahead and installed pulp first then tried to install galaxy-ng by uncommenting the galaxy-ng in the install.yml file `—

  • hosts: all
    force_handlers: True
    collections:
    • pulp.pulp_installer
      vars:
      pulp_settings:
      secret_key: 6amzbet0yhv3idmku1lc4mac
      content_origin: “https://{{ ansible_fqdn }}”
      pulp_default_admin_password: 1epmNj6nh5.
      pulp_install_plugins:
      galaxy-ng:`
      Now i get a different error in the

TASK [pulp.pulp_installer.pulp_common : Run pip-compile to check pulpcore/plugin compatibility]
[WARNING]: conditional statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ failed_condition | default("compatibility.rc != 0") }} fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["/usr/local/lib/pulp/bin/pip-compile"], "delta": "0:00:01.100505", "end": "2023-03-13 16:21:57.940648", "failed_when_result": true, "msg": "non-zero return code", "rc": 2, "start": "2023-03-13 16:21:56.840143", "stderr": "WARNING: the legacy dependency resolver is deprecated and will be removed in future versions of pip-tools. The default resolver will be changed to 'backtracking' in pip-tools 7.0.0. Specify --resolver=backtracking to silence this warning.\nUsing legacy resolver. Consider using backtracking resolver with –resolver=backtracking.\nCould not find a version that matches pulpcore<3.22.0
snip
"There are incompatible versions in the resolved dependencies:", " pulpcore~=3.22.0 (from -r requirements.in (line 1))", " pulpcore<3.25,>=3.21 (from pulp-rpm==3.19.1->-r requirements.in (line 4))", " pulpcore<3.22.0,>=3.21.1 (from galaxy-ng==4.6.3->-r requirements.in (line 2))", " pulpcore<3.25,>=3.20.0 (from pulp-container==2.14.3->-r requirements.in (line 3))"], "stdout": "", "stdout_lines": []}

I’ve tried various different versions to resolve the incompatability (including disabling selinux)

galaxy_ng wants core/3.21, and you’ve got 3.22 installed. You could try something like pip install --force-reinstall -v "pulpcore==3.21.5" to get the most-recent 3.21 release.

I already have pulp installed and I’m starting to work with pulp. I’ll need to test it later. Thank you!
That version may also create dependency issues with the other plugins:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. pulp-container 2.14.3 requires jsonschema<4.17,>=4.4, but you have jsonschema 4.17.3 which is incompatible. pulp-cli 0.18.0 requires PyYAML~=5.3, but you have pyyaml 6.0 which is incompatible. pulp-ansible 0.15.3 requires PyYAML<6.0, but you have pyyaml 6.0 which is incompatible. galaxy-importer 0.4.5 requires attrs<22,>=21.2.0, but you have attrs 22.2.0 which is incompatible. galaxy-importer 0.4.5 requires pyyaml<6,>=5.4.1, but you have pyyaml 6.0 which is incompatible.

FYI: You’re best off using pulp_Installer 3.21.5 (the latest 3.21.z release) to get pulpcore 3.21.