We don't have one for Pulp3 yet, but we do want to make one. I created a stub issue here to start tracking that effort.
https://pulp.plan.io/issues/4658 On Tue, Apr 9, 2019 at 10:58 AM Juan Cabrera <juan.cabr...@unamur.be> wrote: > Thanks. > > I suppose this does not work with pup 3.x , isn't it ? > On 9/04/19 16:00, Kodiak Firesmith wrote: > > For Pulp 2.x, I use this plus some extra commands: > https://docs.ansible.com/ansible/latest/modules/pulp_repo_module.html > > On Tue, Apr 9, 2019 at 9:48 AM Juan Cabrera <juan.cabr...@unamur.be> > wrote: > >> Hi, >> >> Is there an ansible module to add or remove a rpm repository ? >> >> I send in attachment the scripts I use for the moment to create and >> remove the rpm repositories. >> >> I use this: >> >> vars: >> >> - pulp_repos: >> - repo: epel_ptci >> remote: epel >> remote_url: https://epel.mirror.it2go.eu/7/x86_64/ >> state: present >> >> TODO: to become idempotent, check if repo already exists >> >> - name: config | Add repositories. >> command: ~/create_repo --repo "{{ item.repo }}" --remote "{{ >> item.remote }}" --href "{{ item.remote_url }}" >> loop: "{{ pulp_repos }}" >> when: item.state is not defined or item.state == 'present' >> become: yes >> become_user: "{{ pulp_repo_user }}" >> >> >> - name: config | Remove repositories >> command: ~/remove_repo --repo "{{ item.repo }}" --remote "{{ >> item.remote }}" >> loop: "{{ pulp_repos }}" >> when: item.state is defined and item.state == 'absent' >> become: yes >> become_user: "{{ pulp_repo_user }}" >> >> What is the best way to check if a repo already exist? >> >> Juan >> -- >> >> Juan CABRERA >> Correspondant informatique >> Département de Mathématiques >> >> T. 081724919 >> juan.cabr...@unamur.be >> http://staff.unamur.be/jbcabrer >> >> Université de Namur ASBL >> Rue de Bruxelles 61 - 5000 Namur >> Belgique >> >> Let’s respect the environment together. >> Only print this message if necessary! >> _______________________________________________ >> Pulp-list mailing list >> Pulp-list@redhat.com >> https://www.redhat.com/mailman/listinfo/pulp-list > > -- > > Juan CABRERA > Correspondant informatique > Département de Mathématiques > > T. 081724919 > juan.cabr...@unamur.be > http://staff.unamur.be/jbcabrer > > Université de Namur ASBL > Rue de Bruxelles 61 - 5000 Namur > Belgique > > Let’s respect the environment together. > Only print this message if necessary! > _______________________________________________ > Pulp-list mailing list > Pulp-list@redhat.com > https://www.redhat.com/mailman/listinfo/pulp-list
_______________________________________________ Pulp-list mailing list Pulp-list@redhat.com https://www.redhat.com/mailman/listinfo/pulp-list