Edit install.yml to avoid the fail of `ansible-playbook site.yml`
fghamacha opened this issue · comments
-
Walid, i think that you need to delete the line
kubectl=1.20.2-00
fromk8s-setup/k8s-ansible/roles/prepare/tasks/install.yml
-
When running
ansible-playbook site.yml
, Ansible installs kubeadm 1.20.2-00. It automatically installs the last version of kubectl . Then, if you have kubectl=1.20.2-00 AFTER kubeadm ininstall.yml
Ansible will try to install kubectl 1.20.2-00. But you already have the last version of kubectl, so this is a downgrade. Because of the attempted downgrade, you get the following error: "E: Packages were downgraded and -y was used without --allow-downgrades.\n" . Then the ansible-playbook site.yml wil fail
Bonjour Fahmi,
Ma recette Ansible installera la version 1.20.2 de kubectl, mais
apparemment tu as déjà installé la version 1.22 (sans passer par Ansible).
Du coup, il faut supprimer la kubectl 1.22 et relancer la recette Ansible.
Ça devrait marcher.
PS: Dans k8s, il faut utiliser la même version de kubectl,kubeadm et kublet
sinon tu auras le message d'erreur ci-dessous..
Le mar. 22 févr. 2022 à 20:16, Fahmi GHAMACHA ***@***.***> a
écrit :
…
-
Please delete the the line kubectl=1.20.2-00 from
k8s-setup/k8s-ansible/roles/prepare/tasks/install.yml
-
When running ansible-playbook site.yml , Ansible install kubeadm
1.20.2-00. It automatically installs the last version of kubectl . Then, if
you have kubectl=1.20.2-00 AFTER kubeadm in install.yml Ansible will
try to install kubectl 1.20.2-00. But you already have the last version of
kubectl, so this is a downgrade. Because of the attempted downgrade, you
get the following error: "E: Packages were downgraded and -y was used
without --allow-downgrades.\n" . Then the ansible-playbook site.yml wil fail
—
Reply to this email directly, view it on GitHub
<#1>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABH6NO7OONKGQH7L6G7V6FLU4POH3ANCNFSM5PCJFMUQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>