<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 25/06/19 21:57, Mike DePaulo wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CACoG9=648sbUM=NG+PDpMpWUjd1BQFv+Y_izZ-hLNCgT_9xjhA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Thu, Jun 6, 2019 at 5:32
            AM Juan Cabrera <<a href="mailto:juan.cabrera@unamur.be"
              moz-do-not-send="true">juan.cabrera@unamur.be</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div bgcolor="#FFFFFF">
              <p>Hi,</p>
              <p>I published the role I made to create and manage the
                rpm repositories for pulp3.<br>
              </p>
              <p><a
                  class="gmail-m_-2135857182722472276moz-txt-link-freetext"
                  href="https://github.com/juan-cabrera/pulp_rpm_repos"
                  target="_blank" moz-do-not-send="true">https://github.com/juan-cabrera/pulp_rpm_repos</a></p>
              <p>I hope this can be helpful.</p>
              <p>Regards</p>
              <p>Juan<br>
              </p>
              <div class="gmail-m_-2135857182722472276moz-signature">--
                <br>
                <div
style="font-family:Verdana,Helvetica,Arial,sans-serif;font-size:8pt;font-weight:normal;color:rgb(97,99,101)">
                  <img src="cid:part3.D836669D.028DA0A9@unamur.be"
                    style="display: block; margin: 1em 0em;" class="">
                  <p style="margin:1em"> <span style="font-weight:bold">Juan
                      CABRERA</span><br>
                    <span style="color:rgb(105,190,40)">Correspondant
                      informatique</span><br>
                    <span>Département de Mathématiques</span> </p>
                  <p style="margin:1em"> <span style="font-weight:bold">T.</span>
                    081724919<br>
                    <a style="color:rgb(105,190,40)"
                      href="mailto:juan.cabrera@unamur.be"
                      target="_blank" moz-do-not-send="true">juan.cabrera@unamur.be</a><br>
                    <a style="color:rgb(105,190,40)"
                      href="http://staff.unamur.be/jbcabrer"
                      target="_blank" moz-do-not-send="true">http://staff.unamur.be/jbcabrer</a>
                  </p>
                  <p style="margin:1em"> <span
                      style="font-weight:bold;font-size:8pt">Université
                      de Namur ASBL</span><br>
                    <span>Rue de Bruxelles 61 - 5000 Namur</span><br>
                    <span>Belgique</span><br>
                  </p>
                  <p
                    style="margin:1em;font-size:6pt;color:rgb(105,190,40)">
                    <span>Let’s respect the environment together.</span><br>
                    <span style="font-weight:bold">Only print this
                      message if necessary!</span><br>
                  </p>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <div><br>
        </div>
        <div>Wow, this is very cool.<br
            class="gmail-Apple-interchange-newline">
        </div>
        <div><br>
        </div>
        <div>I'm curious, do you write & use this to manage multiple
          separate Pulp3 servers?</div>
        <div><br>
        </div>
        <div>Or did you write and use it because you prefer this Ansible
          interface over the original REST API?</div>
      </div>
    </blockquote>
    <p>Hi Mike,</p>
    <p>I have update the role to add/remove package.</p>
    <p><a class="moz-txt-link-freetext" href="https://github.com/juan-cabrera/pulp_rpm_repos">https://github.com/juan-cabrera/pulp_rpm_repos</a></p>
    <p><a class="moz-txt-link-freetext" href="https://galaxy.ansible.com/juan_cabrera/pulp_rpm_repos">https://galaxy.ansible.com/juan_cabrera/pulp_rpm_repos</a><br>
    </p>
    <p>In principle we will have one server but I suppose it is not a
      problem to have multiple servers.</p>
    <p>One example of variable files I use is:</p>
    <p><tt>$ cat </tt><tt>/home/jcabrera/repos.yml</tt></p>
    <p><tt>---</tt><tt><br>
      </tt><tt><br>
      </tt><tt>pulp_admin_user: admin</tt><tt><br>
      </tt><tt>pulp_default_admin_password: password</tt><tt><br>
      </tt><tt>pulp_api_server: <a class="moz-txt-link-freetext" href="http://10.0.148.220:24817">http://10.0.148.220:24817</a></tt><tt><br>
      </tt><tt>__pkg_dir: /home/jcabrera/mnt/pkg</tt><tt><br>
      </tt><tt><br>
      </tt><tt>pulp_sync_repos:</tt><tt><br>
      </tt><tt>  - repo: foo</tt><tt><br>
      </tt><tt>    repo_version: latest</tt><tt><br>
      </tt><tt>    remote: bar</tt><tt><br>
      </tt><tt>    remote_url:
        <a class="moz-txt-link-freetext" href="https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/">https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/</a></tt><tt><br>
      </tt><tt>    policy: immediate</tt><tt><br>
      </tt><tt>    base_path: arch/foo</tt><tt><br>
      </tt><tt>    distribution: bar</tt><tt><br>
      </tt><tt>    sync: y</tt><tt><br>
      </tt><tt>    state: absent</tt><tt><br>
      </tt><tt><br>
      </tt><tt>pulp_local_repos:</tt><tt><br>
      </tt><tt>  - repo: RedHat-7_6_45_7_None_2018b</tt><tt><br>
      </tt><tt>    repo_version: latest</tt><tt><br>
      </tt><tt>    add_packages:</tt><tt><br>
      </tt><tt>      - GCC-7.3.0-2.30-eb_3.9.0-1.x86_64.rpm</tt><tt><br>
      </tt><tt>      - GCCcore-7.3.0-eb_3.9.0-1.x86_64.rpm</tt><tt><br>
      </tt><tt>      -
        OpenMPI-3.1.1-GCC-7.3.0-2.30-eb_3.9.0-1.x86_64.rpm</tt><tt><br>
      </tt><tt>    remove_packages:</tt><tt><br>
      </tt><tt>      -
        OpenBLAS-0.3.1-GCC-7.3.0-2.30-eb_3.9.0-1.x86_64.rpm</tt><tt><br>
      </tt><tt>      -
        OpenBLAS-0.3.1-GCC-7.3.0-2.30-eb_3.9.1-2.x86_64.rpm</tt><tt><br>
      </tt><tt>    pkg_dir: "{{ __pkg_dir }}"</tt><tt><br>
      </tt><tt>    base_path: RedHat-7_6_45_7_None/easybuild/2018b</tt><tt><br>
      </tt><tt>    distribution: RedHat-7_6_45_7_None_2018b</tt><tt><br>
      </tt><tt>    state: absent</tt><tt><br>
      </tt><tt># repo with big packages</tt><tt><br>
      </tt><tt>  - repo: RedHat-7_6_45_7_None_sticky</tt><tt><br>
      </tt><tt>    repo_version: latest</tt><tt><br>
      </tt><tt>    add_packages:</tt><tt><br>
      </tt><tt>      -
        Schrodinger-2018-1_Linux-x86_64-eb_3.5.1-1.x86_64.rpm</tt><tt><br>
      </tt><tt>      - TURBOMOLE-7.2.1-eb_3.6.0-1.x86_64.rpm</tt><tt><br>
      </tt><tt>    remove_packages: []</tt><tt><br>
      </tt><tt>    pkg_dir: "{{ __pkg_dir }}"</tt><tt><br>
      </tt><tt>    base_path: RedHat-7_6_45_7_None/easybuild/sticky</tt><tt><br>
      </tt><tt>    distribution: RedHat-7_6_45_7_None_sticky</tt><tt><br>
      </tt><tt>    state: present</tt><tt><br>
      </tt></p>
    <p>We will run this from the build server. In the workflow, we
      compile the applications, build the packages, update the <tt>repos.yml</tt>
      file and run the playbook:</p>
    <p><tt>ansible-playbook  -c local --extra-vars
        "@/home/jcabrera/repos.yml" playbooks/pulp_api.yml</tt><br>
    </p>
    <p>The playbook is just</p>
    <p><tt>- hosts: localhost</tt><tt><br>
      </tt><tt>     roles:</tt><tt><br>
      </tt><tt>       - { role: pulp_rpm_repos }</tt><br>
    </p>
    <p>To use another Pulp server, we just need to change the IP in the<tt>
        pulp_api_server</tt> variable<tt> </tt><tt><br>
      </tt></p>
    <p><tt></tt><tt>pulp_api_server: <a class="moz-txt-link-freetext" href="http://10.0.148.220:24817">http://10.0.148.220:24817</a></tt></p>
    If you have some suggestions they are welcome.<br>
    <p>Juan<br>
      <tt>
      </tt></p>
    <blockquote type="cite"
cite="mid:CACoG9=648sbUM=NG+PDpMpWUjd1BQFv+Y_izZ-hLNCgT_9xjhA@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">
            <p
style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:capitalize"><span>Mike</span> <span>DePaulo</span><span
style="text-transform:uppercase;color:rgb(170,170,170);margin:0px"></span></p>
            <p
style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px
              0px 4px;text-transform:capitalize">He / Him / His</p>
            <p
style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px;text-transform:capitalize"><span>Service
                Reliability Engineer, Pulp</span></p>
            <p
              style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;margin:0px
              0px 4px;font-size:12px"><a href="https://www.redhat.com/"
                style="color:rgb(0,136,206);margin:0px" target="_blank"
                moz-do-not-send="true">Red Hat<span></span></a></p>
            <p
style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;margin:0px;font-size:12px"><span>IM: <span>mikedep333</span></span></p>
            <p
style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:12px;margin:0px"><span>GPG:
                51745404</span></p>
            <div
style="color:rgb(0,0,0);font-family:RedHatText,sans-serif;font-size:medium;margin-top:12px">
              <table border="0">
                <tbody>
                  <tr>
                    <td width="100px"><a href="https://www.redhat.com/"
                        target="_blank" moz-do-not-send="true"><img
src="https://marketing-outfit-prod-images.s3-us-west-2.amazonaws.com/f5445ae0c9ddafd5b2f1836854d7416a/Logo-RedHat-Email.png"
                          moz-do-not-send="true" width="90"
                          height="auto"></a></td>
                  </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <div class="moz-signature">-- <br>
      <div style="font-family: Verdana, Helvetica, Arial, sans-serif;
        font-size: 8pt; font-weight: normal; color: #616365;"> <img
          src="cid:part9.A570180D.CBCE7A3C@unamur.be" style="display:
          block; margin: 1em 0em;">
        <p style="margin: 1em;"> <span style="font-weight: bold;">Juan
            CABRERA</span><br>
          <span style="color: #69BE28;">Correspondant informatique</span><br>
          <span>Département de Mathématiques</span> </p>
        <p style="margin: 1em;">
          <span style="font-weight: bold;">T.</span> 081724919<br>
          <a style="color: #69BE28;"
            href="mailto:juan.cabrera@unamur.be">juan.cabrera@unamur.be</a><br>
          <a style="color: #69BE28;"
            href="http://staff.unamur.be/jbcabrer">http://staff.unamur.be/jbcabrer</a>
        </p>
        <p style="margin: 1em;"> <span style="font-weight: bold;
            font-size: 8pt;">Université de Namur ASBL</span><br>
          <span>Rue de Bruxelles 61 - 5000 Namur</span><br>
          <span>Belgique</span><br>
        </p>
        <p style="margin: 1em; font-size: 6pt; color: #69BE28;"> <span>Let’s
            respect the environment together.</span><br>
          <span style="font-weight: bold;">Only print this message if
            necessary!</span><br>
        </p>
      </div>
    </div>
  </body>
</html>