Skip to content
← Back to activity

Immutable solution version

Ansible + 10.11.6

Version 3Sign in to save

Complete solution

Shows how to fix ansible + 10.11.6. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

The ansible documentation suggests doing this for every host by hand: ansible myhost --sudo -m raw -a "yum install -y python2 python-simplejson" However I think it's nicer to bootstrap all of your hosts with this snippet at the start of you playbook: - name: Bootrstrap python hosts: YOURHOST tasks: raw: sudo apt-get update && sudo apt-get -y python-simplejson delegateto: '{{ item }}' with_items: {{ groups["hosts"] }} Context: Stack Overflow #38799807 (top answer, 5 votes, 3 answers): I'm having a weird issue with Ansible on a (very) clean install of 10.11.6.

Steps

  1. [zabeltech (top answer)] This happens if there is no python installed on the remote hosts. The ansible documentation suggests doing this for every host by hand: ansible myhost --sudo -m raw -a "yum install -y python2 python-simplejson" However I think it's nicer to bootstrap all of your hosts with this snippet at the start of you playbook: - name: Bootrstrap python hosts: YOURHOST tasks: raw: sudo apt-get update && sudo apt-get -y python-simplejson delegateto: '{{ item }}' with_items: {{ groups["hosts"] }}

When to use

You are seeing this: I then went to a preexisting (and crazy simple) Ansible project and did an... ansible -m ping all It then asked me to enter my SSH passphrase. Use this skill when you run into "Ansible + 10.11.6".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: 10.11.6. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: Stack Overflow #38799807 (top answer, 5 votes, 3 answers): I'm having a weird issue with Ansible on a (very) clean install of 10.11.6. I've installed brew, zsh, oh-my-zsh, Lil' snitch and 1password (and literally nothing else). I installed ansible with... brew install ansible ... which was successful. I then went to a preexisting (and crazy simple) Ansible project and did an... ansible -m ping all It then asked me to enter my SSH passphrase. I've reinstated the keys from my previous install but I hadn't previously ssh'd into the server. I entered the passphrase and ansible returned... ``` $ ansible -m ping all host1 | UNREACHABLE!

Verified resolution: [zabeltech (top answer)] This happens if there is no python installed on the remote hosts. The ansible documentation suggests doing this for every host by hand: ansible myhost --sudo -m raw -a "yum install -y python2 python-simplejson" However I think it's nicer to bootstrap all of your hosts with this snippet at the start of you playbook: - name: Bootrstrap python hosts: YOURHOST tasks: raw: sudo apt-get update && sudo apt-get -y python-simplejson delegateto: '{{ item }}' with_items: {{ groups["hosts"] }}

Source URL: https://stackoverflow.com/questions/38799807

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_5gu9IeScqi_-E73m89MDNw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Ansible + 10.11.6 <span>— Vectle</span></a>