Hi all,
The problem was that the workers needed to be updated with ''yum -y
update''. I added the following code to my playbook:
- name: yum update
yum:
name: '*'
state: latest
Unfortunately I don't know why this solved the problem :(
Thanks for helping!
Em sexta-feira, 11 de maio de 2018 08:44:37 UTC-3, Jean-Yves LENHOF
escreveu:
>
> Hi,
>
> Please provide logs to see the exact problem
>
> Perhaps information given by a manual yum could help also...
>
>
> But looking for your problem I found some related information that could
> (not sure) let us know that the problem is somewhere else :
>
> https://github.com/kubernetes/kubernetes/issues/37922
>
> https://github.com/kubernetes/kubernetes/issues/60134
>
> Regards,
>
> JY
>
> Le 11/05/2018 à 13:26, Fabio Gomes Sakiyama a écrit :
>
> Hi Jean/js.a
>
> I splitted up but the error persists. I'm not sure if my playbook is
> correct though. Here's the splitted playbook.
>
> ---
> - hosts: all
> become: yes
> tasks:
> - name: install docker
> yum:
> name: docker
> state: present
> update_cache: true
>
> - name: add yum key repo
> rpm_key:
> key: "https://packages.cloud.google.com/yum/doc/yum-key.gpg"
> <https://packages.cloud.google.com/yum/doc/yum-key.gpg>
> state: present
>
> - name: add rpm key repo
> rpm_key:
> key:
> "https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg"
> <https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg>
> state: present
>
> - name: add repo
> yum_repository:
> name: kuberepo
> description: kubernetes-repo
> baseurl:
> "https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64"
> <https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64>
> enabled: yes
> gpgcheck: yes
> repo_gpgcheck: yes
>
>
>
>
> Em sexta-feira, 11 de maio de 2018 00:11:46 UTC-3, js.a escreveu:
>>
>> Hey Fabio, like Jean-Yves said, try to split up your "Add repo" task in
>> two, key install and package install. Something like this:
>>
>> - name: add key repo
>> rpm_key:
>> key: "
>> https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg"
>> state: present
>>
>> - name: add repo
>> yum_repository:
>> name: kuberepo
>> description: kubernetes-repo
>> baseurl: "
>> https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64"
>> enabled: yes
>> gpgcheck: yes
>> repo_gpgcheck: yes
>>
>>
>> -------------------------------------------------
>>
>> Em quinta-feira, 10 de maio de 2018 17:02:54 UTC-3, Jean-Yves LENHOF
>> escreveu:
>>>
>>> Hi,
>>>
>>> Could you try to add the GPG key with something like this before doing
>>> the yum ansible command ?
>>>
>>> - name: Add repository key
>>> rpm_key:
>>> key: "https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg"
>>> <https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg>
>>>
>>> Regards,
>>>
>>> Le 10/05/2018 à 18:25, Fabio Gomes Sakiyama a écrit :
>>>
>>> Hi,
>>>
>>> I'm trying to install kubelet with *Ansible*, but I'm struggling to do
>>> it.
>>>
>>>
>>> This is my *playbook*:
>>>
>>>
>>> ---
>>> - hosts: all
>>> become: yes
>>> tasks:
>>> - name: install docker
>>> yum:
>>> name: docker
>>> state: present
>>> update_cache: true
>>>
>>> - name: add repo
>>> yum_repository:
>>> name: kuberepo
>>> description: kubernetes-repo
>>> baseurl:
>>> "https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64"
>>> <https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64>
>>> enabled: yes
>>> gpgcheck: yes
>>> repo_gpgcheck: yes
>>> gpgkey:
>>> - "https://packages.cloud.google.com/yum/doc/yum-key.gpg"
>>> <https://packages.cloud.google.com/yum/doc/yum-key.gpg>
>>> -
>>> "https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg"
>>> <https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg>
>>>
>>> - name: setenforce
>>> shell: setenforce 0
>>>
>>> - name: install kubelet
>>> yum:
>>> name: kubelet
>>> state: present
>>> update_cache: true
>>>
>>>
>>> This is the *error* when i run the playbook (ansible-playbook -i hosts
>>> kube-dependencies.yml)
>>>
>>>
>>> <https://lh3.googleusercontent.com/-oT8v8pXEIb0/WvRyKSWIGvI/AAAAAAAATK8/ZpT3y8kJ5cwPjxgUQ3hBkMhMSxI_ByIjgCLcBGAs/s1600/ansibleError.png>
>>>
>>>
>>> The "ok" from [master] node is because I manually executed "sudo yum
>>> install kubelet" on that machine, and it worked.
>>>
>>>
>>> *Conclusions:* So basically, manually executing the yum install command
>>> it works, but I can't make it work with ansible.
>>>
>>>
>>> Any clues? What am I doing wrong?
>>>
>>>
>>> Thanks in advance!
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/d20d7fb9-3fb7-4084-8655-950b69a38380%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/ansible-project/d20d7fb9-3fb7-4084-8655-950b69a38380%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected]
> <javascript:>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/fd327a34-5296-40b9-bc09-a271d0eee74d%40googlegroups.com
>
> <https://groups.google.com/d/msgid/ansible-project/fd327a34-5296-40b9-bc09-a271d0eee74d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/3a110d13-20a3-40d1-be42-a84a662f7403%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.