Setting distribution while creating a deb package

Hello guys :lemon:,
I’m using pulp_squeezer module to sync deb repositories through Ansible, but
while I’m synchronizing the repository to a specific distributions (stable), I expect that the distribution should stay the same as the remote, but it’s set to default instead.

Expected path: repository_name/ubuntu/dists/stable/
Current outcome path: repository_name/ubuntu/dists/default/

It this behavior intentional?
It there a way to customize it?

Related code
- name: "Create {{ repository_type }} remote objects"
    name: "remote-{{ repository_type }}-{{ }}"
    url: "{{ repo.url }}"
    state: present
    policy: "{{remote_sync_policy}}"
    distributions: "stable"

- name: "Create {{ repository_type }} repository"
    name: "{{ repository_type }}-{{ }}"
    state: present

- name: "Sync {{ repository_type }} repository from remote"
    remote: "remote-{{ repository_type }}-{{ }}"
    repository: "{{ repository_type }}-{{ }}"
    mirror: true

- name: "Create a {{ repository_type }} publication"
    repository: "{{ repository_type }}-{{ }}"
    state: present

- name: "Create a {{ repository_type }} distribution"
    name: "{{ repository_type }}-{{ }}"
    base_path: "{{ }}/{{ repository_type }}"
    state: present
    publication: "{{ pub_result.publication.pulp_href }}"

- name: "Remove {{ repository_type }} feed"
      name: "remote-{{ repository_type }}-{{ }}"
      state: absent
1 Like

I think, what you want is to use mode: structured with the deb_publication module.

Also note there was a big pulp_deb update this week and squeezer, sadly, is a bit behind. I hope it still works together.


Love to hear there are actual squeezer users out there!

1 Like

I can also add some more extra context here:

@x9c4 is correct that this behaviour depends on whether the Pulp publication in question was created using “simple” and/or “structured” mode. Starting with pulp_deb 3.0.0 the server default is to use structured and not simple. This would result in your expected path.

You can read up on the behaviour in the last < 3.0.0 version of the documentation: Feature Overview — Pulp deb Support 2.21.2 documentation
By comparison the current version of the documentation which expects everyone to use “structured” by default has this to say: Feature Overview — Pulp deb Support 3.0.0 documentation

Even if you do upgrade to 3.0.0, I do not know if squeezer will rely on the servers default value of “structured” for publications, or whether it explicitly sets a default value of its own.