ansible/ansible — pull request #9458 by sthen (2014-10-30 13:46:14+00:00)
Title: set CPU architecture correctly for OpenBSD (powerpc not macppc, etc.)

On some OpenBSD arch, cpu arch != machine arch. For example, cpu arch "powerpc" has two possibilities for machine arch, "macppc" and "socppc". Similar for some other architectures e.g. arm, mips64, mips64el, sh. OpenBSD packages are built by cpu arch, not machine arch, so this information is required in order to construct a URL to fetch packages from.

Before this diff:

$ ansible -m setup mala -a filter=*chi*
mala | success >> {
"ansible_facts": {
"ansible_architecture": "macppc",
"ansible_machine": "macppc"
},
"changed": false
}

After:

$ ansible -m setup mala -a filter=*chi*
mala | success >> {
"ansible_facts": {
"ansible_architecture": "powerpc",
"ansible_machine": "macppc"
},
"changed": false
}