Re: configuring ansible apt-repository for i386

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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}


--
Thierry Delamare
t.delamare@xxxxxxxxxxx
06 10 60 56 00

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux