RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Ansible on Retropie/Raspbian

    Scheduled Pinned Locked Moved Help and Support
    ansibleconfigurationpipretropieraspbian
    2 Posts 1 Posters 729 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • OurFriendIronyO
      OurFriendIrony
      last edited by

      Hi all,

      Has anyone tried using ansible on retropie/raspbian?

      I've recently started using ansible to manage/setup my linux ubuntu dev box. I figured it might be nice to use it to apply my own customisation to the retropie image to make rebuilding on new SDs nice an easy.

      I've had a bit of trouble getting ansible installed.
      sudo pip install ansible
      Gets so far and then crashes out.

      Has anyone tried and/or succeeded on getting ansible installed?

      Im using retropie 4.3, ansible 2.4.1

      1 Reply Last reply Reply Quote 0
      • OurFriendIronyO
        OurFriendIrony
        last edited by

        Figured I'd share the error I was getting. Firstly, you need to be using Python 3+ for the version of ansible.

        sudo pip install ansible

        Downloading/unpacking ansible
          Downloading ansible-2.4.1.0.tar.gz (6.7MB): 6.7MB downloaded
        
          Running setup.py (path:/tmp/pip-build-f2xlqxxd/ansible/setup.py) egg_info for package ansible
            no previously-included directories found matching 'ticket_stubs'
            no previously-included directories found matching 'hacking'
        Requirement already satisfied (use --upgrade to upgrade): jinja2 in /usr/local/lib/python3.4/dist-packages (from ansible)
        Requirement already satisfied (use --upgrade to upgrade): PyYAML in /usr/local/lib/python3.4/dist-packages (from ansible)
        Requirement already satisfied (use --upgrade to upgrade): paramiko in /usr/local/lib/python3.4/dist-packages (from ansible)
        Requirement already satisfied (use --upgrade to upgrade): cryptography in /usr/local/lib/python3.4/dist-packages (from ansible)
        Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python3.4/dist-packages (from ansible)
        Requirement already satisfied (use --upgrade to upgrade): idna>=2.1 in /usr/local/lib/python3.4/dist-packages (from cryptography->ansible)
        Requirement already satisfied (use --upgrade to upgrade): asn1crypto>=0.21.0 in /usr/local/lib/python3.4/dist-packages (from cryptography->ansible)
        Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/local/lib/python3.4/dist-packages (from cryptography->ansible)
        Installing collected packages: ansible
          Running setup.py install for ansible
            changing mode of build/scripts-3.4/ansible from 644 to 755
            changing mode of build/scripts-3.4/ansible-playbook from 644 to 755
            changing mode of build/scripts-3.4/ansible-pull from 644 to 755
            changing mode of build/scripts-3.4/ansible-doc from 644 to 755
            changing mode of build/scripts-3.4/ansible-galaxy from 644 to 755
            changing mode of build/scripts-3.4/ansible-console from 644 to 755
            changing mode of build/scripts-3.4/ansible-connection from 644 to 755
            changing mode of build/scripts-3.4/ansible-vault from 644 to 755
            no previously-included directories found matching 'ticket_stubs'
            no previously-included directories found matching 'hacking'
            changing mode of /usr/local/bin/ansible to 755
            changing mode of /usr/local/bin/ansible-doc to 755
            changing mode of /usr/local/bin/ansible-galaxy to 755
            changing mode of /usr/local/bin/ansible-connection to 755
            changing mode of /usr/local/bin/ansible-console to 755
            changing mode of /usr/local/bin/ansible-inventory to 755
            changing mode of /usr/local/bin/ansible-vault to 755
            changing mode of /usr/local/bin/ansible-playbook to 755
            changing mode of /usr/local/bin/ansible-config to 755
            changing mode of /usr/local/bin/ansible-pull to 755
          Could not find .egg-info directory in install record for ansible
        Successfully installed ansible
        Cleaning up...
        

        Looks good so far, but...

        ansible --version

        ERROR! Unexpected Exception, this is probably a bug: unsupported operand type(s) for %: 'bytes' and 'bytes'
        the full traceback was:
        
        Traceback (most recent call last):
          File "/usr/local/bin/ansible", line 85, in <module>
            mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
          File "/usr/local/lib/python3.4/dist-packages/ansible/cli/__init__.py", line 38, in <module>
            from ansible.inventory.manager import InventoryManager
          File "/usr/local/lib/python3.4/dist-packages/ansible/inventory/manager.py", line 44, in <module>
            IGNORED_EXTS = [b'%s$' % to_bytes(re.escape(x)) for x in C.INVENTORY_IGNORE_EXTS]
          File "/usr/local/lib/python3.4/dist-packages/ansible/inventory/manager.py", line 44, in <listcomp>
            IGNORED_EXTS = [b'%s$' % to_bytes(re.escape(x)) for x in C.INVENTORY_IGNORE_EXTS]
        TypeError: unsupported operand type(s) for %: 'bytes' and 'bytes'
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.