Ansible modules copy/template errors for Linux 5 hosts using python26 ,python binding libselinux-python...












0















We have some 50 odd linux 5 hosts, and to manage that we use ansible.



Problem :- Ansible modules copy/template errors for Linux 5 hosts using python26 ,python binding libselinux-python needed



Actual error :-
fatal : FAILED! => {"changed": false, "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"}



Environment:-




Ansible Master node : - EL7
Selinux enabled
libselinux-python : installed libselinux-python.x86_64 0:2.5-14.1.el7

Node :- EL 5
Selinux enabled
Using ansible_python_interpreter=/usr/bin/python26
libselinux-python : installed libselinux-python-1.33.4-5.7.el5.x86_64



Description:-



I see the problem



With default Python ...




selinux]# python
Python 2.4.3 (#1, May 5 2011, 15:12:27)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import selinux
selinux.is_selinux_enabled()
1


And with python26




[root@dev-bozo21 selinux]# python26
Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import selinux
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named selinux


I tried copying



"/usr/lib64/python2.4/site-packages/selinux to /usr/lib64/python2.6/site-packages/selinux ( this was empty earlier)"



it throws this error




python26
Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import selinux
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 5, in
import _selinux
ImportError: /usr/lib64/python2.6/site-packages/selinux/_selinux.so: undefined symbol: Py_InitModule4


And when copying



"/usr/lib64/python2.7/site-packages/selinux/init.py" ( from different centos 7 node) to /usr/lib64/python2.6/site-packages/selinux/



I get below error




python2.6
Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import selinux
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 26, in
_selinux = swig_import_helper()
File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 22, in swig_import_helper
_mod = imp.load_module('_selinux', fp, pathname, description)
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib64/python2.6/site-packages/selinux/_selinux.so)


Any solution for this problem ?









share



























    0















    We have some 50 odd linux 5 hosts, and to manage that we use ansible.



    Problem :- Ansible modules copy/template errors for Linux 5 hosts using python26 ,python binding libselinux-python needed



    Actual error :-
    fatal : FAILED! => {"changed": false, "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"}



    Environment:-




    Ansible Master node : - EL7
    Selinux enabled
    libselinux-python : installed libselinux-python.x86_64 0:2.5-14.1.el7

    Node :- EL 5
    Selinux enabled
    Using ansible_python_interpreter=/usr/bin/python26
    libselinux-python : installed libselinux-python-1.33.4-5.7.el5.x86_64



    Description:-



    I see the problem



    With default Python ...




    selinux]# python
    Python 2.4.3 (#1, May 5 2011, 15:12:27)
    [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.

    import selinux
    selinux.is_selinux_enabled()
    1


    And with python26




    [root@dev-bozo21 selinux]# python26
    Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
    [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.

    import selinux
    Traceback (most recent call last):
    File "", line 1, in
    ImportError: No module named selinux


    I tried copying



    "/usr/lib64/python2.4/site-packages/selinux to /usr/lib64/python2.6/site-packages/selinux ( this was empty earlier)"



    it throws this error




    python26
    Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
    [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.

    import selinux
    Traceback (most recent call last):
    File "", line 1, in
    File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 5, in
    import _selinux
    ImportError: /usr/lib64/python2.6/site-packages/selinux/_selinux.so: undefined symbol: Py_InitModule4


    And when copying



    "/usr/lib64/python2.7/site-packages/selinux/init.py" ( from different centos 7 node) to /usr/lib64/python2.6/site-packages/selinux/



    I get below error




    python2.6
    Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
    [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.

    import selinux
    Traceback (most recent call last):
    File "", line 1, in
    File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 26, in
    _selinux = swig_import_helper()
    File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 22, in swig_import_helper
    _mod = imp.load_module('_selinux', fp, pathname, description)
    ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib64/python2.6/site-packages/selinux/_selinux.so)


    Any solution for this problem ?









    share

























      0












      0








      0








      We have some 50 odd linux 5 hosts, and to manage that we use ansible.



      Problem :- Ansible modules copy/template errors for Linux 5 hosts using python26 ,python binding libselinux-python needed



      Actual error :-
      fatal : FAILED! => {"changed": false, "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"}



      Environment:-




      Ansible Master node : - EL7
      Selinux enabled
      libselinux-python : installed libselinux-python.x86_64 0:2.5-14.1.el7

      Node :- EL 5
      Selinux enabled
      Using ansible_python_interpreter=/usr/bin/python26
      libselinux-python : installed libselinux-python-1.33.4-5.7.el5.x86_64



      Description:-



      I see the problem



      With default Python ...




      selinux]# python
      Python 2.4.3 (#1, May 5 2011, 15:12:27)
      [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.

      import selinux
      selinux.is_selinux_enabled()
      1


      And with python26




      [root@dev-bozo21 selinux]# python26
      Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
      [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.

      import selinux
      Traceback (most recent call last):
      File "", line 1, in
      ImportError: No module named selinux


      I tried copying



      "/usr/lib64/python2.4/site-packages/selinux to /usr/lib64/python2.6/site-packages/selinux ( this was empty earlier)"



      it throws this error




      python26
      Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
      [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.

      import selinux
      Traceback (most recent call last):
      File "", line 1, in
      File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 5, in
      import _selinux
      ImportError: /usr/lib64/python2.6/site-packages/selinux/_selinux.so: undefined symbol: Py_InitModule4


      And when copying



      "/usr/lib64/python2.7/site-packages/selinux/init.py" ( from different centos 7 node) to /usr/lib64/python2.6/site-packages/selinux/



      I get below error




      python2.6
      Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
      [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.

      import selinux
      Traceback (most recent call last):
      File "", line 1, in
      File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 26, in
      _selinux = swig_import_helper()
      File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 22, in swig_import_helper
      _mod = imp.load_module('_selinux', fp, pathname, description)
      ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib64/python2.6/site-packages/selinux/_selinux.so)


      Any solution for this problem ?









      share














      We have some 50 odd linux 5 hosts, and to manage that we use ansible.



      Problem :- Ansible modules copy/template errors for Linux 5 hosts using python26 ,python binding libselinux-python needed



      Actual error :-
      fatal : FAILED! => {"changed": false, "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"}



      Environment:-




      Ansible Master node : - EL7
      Selinux enabled
      libselinux-python : installed libselinux-python.x86_64 0:2.5-14.1.el7

      Node :- EL 5
      Selinux enabled
      Using ansible_python_interpreter=/usr/bin/python26
      libselinux-python : installed libselinux-python-1.33.4-5.7.el5.x86_64



      Description:-



      I see the problem



      With default Python ...




      selinux]# python
      Python 2.4.3 (#1, May 5 2011, 15:12:27)
      [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.

      import selinux
      selinux.is_selinux_enabled()
      1


      And with python26




      [root@dev-bozo21 selinux]# python26
      Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
      [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.

      import selinux
      Traceback (most recent call last):
      File "", line 1, in
      ImportError: No module named selinux


      I tried copying



      "/usr/lib64/python2.4/site-packages/selinux to /usr/lib64/python2.6/site-packages/selinux ( this was empty earlier)"



      it throws this error




      python26
      Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
      [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.

      import selinux
      Traceback (most recent call last):
      File "", line 1, in
      File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 5, in
      import _selinux
      ImportError: /usr/lib64/python2.6/site-packages/selinux/_selinux.so: undefined symbol: Py_InitModule4


      And when copying



      "/usr/lib64/python2.7/site-packages/selinux/init.py" ( from different centos 7 node) to /usr/lib64/python2.6/site-packages/selinux/



      I get below error




      python2.6
      Python 2.6.8 (unknown, Nov 7 2012, 14:47:45)
      [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.

      import selinux
      Traceback (most recent call last):
      File "", line 1, in
      File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 26, in
      _selinux = swig_import_helper()
      File "/usr/lib64/python2.6/site-packages/selinux/init.py", line 22, in swig_import_helper
      _mod = imp.load_module('_selinux', fp, pathname, description)
      ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib64/python2.6/site-packages/selinux/_selinux.so)


      Any solution for this problem ?







      linux selinux ansible





      share












      share










      share



      share










      asked 7 mins ago









      Prakash SharmaPrakash Sharma

      83




      83






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507877%2fansible-modules-copy-template-errors-for-linux-5-hosts-using-python26-python-bi%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507877%2fansible-modules-copy-template-errors-for-linux-5-hosts-using-python26-python-bi%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          CARDNET

          Boot-repair Failure: Unable to locate package grub-common:i386

          Aws NAT - Aws IGW- Aws router