title: Why do I get ansible_kernel.split error when I have ansible 4.10 installed?
body: <p>I'm trying to install a Kubernetes cluster with kubespray 1.18.0 and I get the error below. I have installed ansible 4.10 with pip3 on centos7.<br />
  I've checked everywhere but did not find a solution for it. I even modifyed the value to use version <code>&lt;=</code> and the step was skipped but in the end it give another error.</p>
  <pre><code>TASK [kubernetes/preinstall : Stop if kernel version is too low] ********** 
  fatal: [master1]: FAILED! =&gt; {
     &quot;assertion&quot;: &quot;ansible_kernel.split('-')[0] is version('4.9.17', '&gt;=')&quot;,
     &quot;changed&quot;: false,
     &quot;evaluated_to&quot;: false,
     &quot;msg&quot;: &quot;Assertion failed&quot;
  }
  fatal: [master2]: FAILED! =&gt; {
      &quot;assertion&quot;: &quot;ansible_kernel.split('-')[0] is version('4.9.17', '&gt;=')&quot;,
      &quot;changed&quot;: false,
      &quot;evaluated_to&quot;: false,
      &quot;msg&quot;: &quot;Assertion failed&quot;
  }
  fatal: [master3]: FAILED! =&gt; {
      &quot;assertion&quot;: &quot;ansible_kernel.split('-')[0] is version('4.9.17', '&gt;=')&quot;,
      &quot;changed&quot;: false,
      &quot;evaluated_to&quot;: false,
      &quot;msg&quot;: &quot;Assertion failed&quot;
  }
  fatal: [worker1]: FAILED! =&gt; {
      &quot;assertion&quot;: &quot;ansible_kernel.split('-')[0] is version('4.9.17', '&gt;=')&quot;,
      &quot;changed&quot;: false,
      &quot;evaluated_to&quot;: false,
      &quot;msg&quot;: &quot;Assertion failed&quot;
  }
  fatal: [worker2]: FAILED! =&gt; {
      &quot;assertion&quot;: &quot;ansible_kernel.split('-')[0] is version('4.9.17', '&gt;=')&quot;,
      &quot;changed&quot;: false,
      &quot;evaluated_to&quot;: false,
      &quot;msg&quot;: &quot;Assertion failed&quot;
  }
  fatal: [worker3]: FAILED! =&gt; {
      &quot;assertion&quot;: &quot;ansible_kernel.split('-')[0] is version('4.9.17', '&gt;=')&quot;,
      &quot;changed&quot;: false,
      &quot;evaluated_to&quot;: false,
      &quot;msg&quot;: &quot;Assertion failed&quot;
  }
  fatal: [istio1]: FAILED! =&gt; {
      &quot;assertion&quot;: &quot;ansible_kernel.split('-')[0] is version('4.9.17', '&gt;=')&quot;,
      &quot;changed&quot;: false,
      &quot;evaluated_to&quot;: false,
      &quot;msg&quot;: &quot;Assertion failed&quot;
  }
  fatal: [monitoring1]: FAILED! =&gt; {
      &quot;assertion&quot;: &quot;ansible_kernel.split('-')[0] is version('4.9.17', '&gt;=')&quot;,
      &quot;changed&quot;: false,
      &quot;evaluated_to&quot;: false,
      &quot;msg&quot;: &quot;Assertion failed&quot;`enter code here`
  }
  </code></pre>
  <p>I installed it via pip3 from the kubespray requirements file and then updated to the las version also using pip update.</p>
  <p>'''</p>
  <pre><code>[root@ansible ~]# pip3 list --uptodate
  Package             Version
  ------------------- -------
  ansible             4.10.0
  ansible-core        2.11.11
  cffi                1.15.0
  importlib-resources 5.4.0
  Jinja2              3.0.3
  jmespath            0.10.0
  MarkupSafe          2.0.1
  netaddr             0.8.0
  packaging           21.3
  pbr                 5.8.1
  pip                 21.3.1
  pycparser           2.21
  pyparsing           3.0.8
  PyYAML              6.0
  resolvelib          0.8.1
  ruamel.yaml         0.17.21
  ruamel.yaml.clib    0.2.6
  setuptools          59.6.0
  six                 1.16.0
  zipp                3.6.0
  [root@ansible ~]#
  
  [root@ansible ~]# ansible --version
  [DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current version: 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)].
  This feature will be removed from ansible-core in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
  ansible [core 2.11.11]
    config file = None
    configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
    ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
    executable location = /usr/local/bin/ansible
    python version = 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
    jinja version = 3.0.3
    libyaml = True
  [root@ansible ~]# uname -a
  Linux ansible 3.10.0-1160.62.1.el7.x86_64 #1 SMP Tue Apr 5 16:57:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  [root@ansible ~]#
  </code></pre>
  <p>'''
  I did not do troubleshooting because I'm new with ansible. I thnink it's facts gathering because is at the preinstall phase and if all the requirements are not made, it failds.
  Update was done in ansible VM but not in the other 7.
  Changed it to smaller then (&lt;=) and the check passed but I see it could impact the network plugin (cilium) and I dont wat that.
  '''</p>
  <ul>
  <li>name: Stop if kernel version is too low
  assert:
  that: ansible_kernel.split('-')[0] is version('4.9.17', '&lt;=')
  when:
  <ul>
  <li>kube_network_plugin == 'cilium' or cilium_deploy_additionally | default(false) | bool</li>
  <li>not ignore_assert_errors
  '''</li>
  </ul>
  </li>
  </ul>