All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loic Dachary <loic@dachary.org>
To: Thierry Delamare <t.delamare@laposte.net>
Cc: Ceph Development <ceph-devel@vger.kernel.org>
Subject: Re: configuring ansible apt-repository for i686
Date: Sun, 27 Mar 2016 17:36:08 +0200	[thread overview]
Message-ID: <56F7FDE8.5010804@dachary.org> (raw)
In-Reply-To: <56F7C50D.7060703@laposte.net>

Hi Thierry,

Thanks for the detailed explanation of how to figure that out :-) https://github.com/ceph/ceph-cm-ansible/pull/220 has the suggested changes for centos 7 and ubuntu.

Cheers

On 27/03/2016 13:33, Thierry Delamare wrote:
> On 03/27/2016 01:28 AM, Loic Dachary wrote:
>> Hi Thierry,
>>
>> Running on an i386 host, ansible does the following:
>>
>> TASK: [testnode | Add local apt repos.] *************************************** ^M
>>
>> 2016-03-27 00:16:20,737.737 INFO:teuthology.task.ansible.out:^[[0;33mchanged: [target167114241144.teuthology] => (item=deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-trusty-x86_64-basic/ref/master/ trusty main) => {"changed": true, "item": "deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-trusty-x86_64-basic/ref/master/ trusty main", "repo": "deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-trusty-x86_64-basic/ref/master/ trusty main", "state": "present"}^[[0m
>>
>> where x86_64 should be i386. I traced that back to
>>
>> https://github.com/ceph/ceph-cm-ansible/blob/master/roles/testnode/tasks/apt/repos.yml#L52
>>
>> - name: Add local apt repos.
>>    apt_repository:
>>      repo: "{{ item }}"
>>      state: present
>>      update_cache: no
>>      mode: 0644
>>    with_items: apt_repos|list + common_apt_repos|list
>>    register: local_apt_repos
>>
>> Do you know how I canfigure out where "item" (which is presumably the incorrect http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-trusty-x86_64-basic/ref/master/ here) is set ?
>>
>> Cheers
>>
> Salut Loic,
> 
> - This task iterate over the cat of two vars (apt_repos and common_apt_repos (yaml list, jinja, iterable converted to list))
> - These vars are (as expected) defined in the std role vars dir (testnode/vars)
>   - ansible auto include vars/main.yml, but in this case, as we mainly have distribution specific vars, the include come from testnode/tasks/vars.yml (testnode/tasks/vars.yml being itself the first task of testnode/tasks/main.yml)
>   - testnode/tasks/vars.yml use ansible auto defined variables (like ansible_distribution or ansible_distribution_major_version) to include the correct files from testnode/tasks (eg. centos_7.yml or ubuntu_14.yml)
> - As a quick an dirty fix or test step you can always redefine a var at ansible invocation using --extra-vars (but you will need to use yaml or json instead of key=val because common_apt_repos expect a list)
> - A simple fix could probably be to replace the srt x86_64 by ansible_architecture in testnode/vars files where it occurs
> 
> - In your specific case:
> 
>   echo -e '/x86_64/s//{{ansible_architecture}}/\nwq' | ed roles/testnode/vars/ubuntu.yml
> 
> - But maybe also in centos_{6,7} debian7 redhat{6,7}
> 
> 

-- 
Loïc Dachary, Artisan Logiciel Libre
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2016-03-27 15:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-27  0:28 configuring ansible apt-repository for i386 Loic Dachary
2016-03-27 11:33 ` Thierry Delamare
2016-03-27 15:36   ` Loic Dachary [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56F7FDE8.5010804@dachary.org \
    --to=loic@dachary.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=t.delamare@laposte.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.