What is the difference between `ansible_architecture` and `ansible_machine` on Ansible?

Viewed 2705

I'm trying to find the architecture of the machine by using Ansible facts.

We can gather information about the machine by running ansible -m setup <host-name> command, as described in the documentation: Discovering variables: facts and magic variables — Ansible Documentation.

But it seems that the ansible_architecture and ansible_machine are the same values. I'm not sure the difference between them. The example on the above documentation shows the following two values which have the same values:

    "ansible_architecture": "x86_64",
    "ansible_machine": "x86_64",

On my M1 MacBook, the result is the same like this:

shuuji3@momo mac-dev-playbook
> ansible -m setup localhost | egrep '_architecture|_machine'
        "ansible_architecture": "arm64",
        "ansible_machine": "arm64",

Can we use these values interchangeably? Or can they have other values in another case?

1 Answers
Related