uuid: - value: d6c8fb91-1f7d-4931-84e3-e7257a79daf2 langcode: - value: en type: - target_id: daily_email target_type: node_type target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7 revision_timestamp: - value: '2025-05-11T09:00:55+00:00' revision_uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 revision_log: { } status: - value: true uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 title: - value: 'Using Ansible for local environment configuration' created: - value: '2022-09-05T00:00:00+00:00' changed: - value: '2025-05-11T09:00:55+00:00' promote: - value: false sticky: - value: false default_langcode: - value: true revision_translation_affected: - value: true path: - alias: /daily/2022/09/05/using-ansible-for-local-configuration langcode: en body: - value: |

As well as configuring servers, you can use Ansible to configure your own local machine and development environment.

The change that you need to make is within the hosts.ini file:

127.0.0.1 ansible_connection=local
      

Instead of the server's IP address or hostname, use the localhost IP address and set ansible_connection to local to tell Ansible to run locally instead of using an SSH connection.

Another way to do this is to set hosts: 127.0.0.1 and connection: true in your playbook.

Once this is done, you can run tasks, roles, and collections to automate tasks such as installing software, adding your SSH keys, configuring your project directories, and anything else that you need to do.

For an example of this, you can see my dotfiles repository on GitHub.


Want to learn more about how I use Ansible? Register for my upcoming free email course.

format: full_html processed: |

As well as configuring servers, you can use Ansible to configure your own local machine and development environment.

The change that you need to make is within the hosts.ini file:

127.0.0.1 ansible_connection=local
      

Instead of the server's IP address or hostname, use the localhost IP address and set ansible_connection to local to tell Ansible to run locally instead of using an SSH connection.

Another way to do this is to set hosts: 127.0.0.1 and connection: true in your playbook.

Once this is done, you can run tasks, roles, and collections to automate tasks such as installing software, adding your SSH keys, configuring your project directories, and anything else that you need to do.

For an example of this, you can see my dotfiles repository on GitHub.


Want to learn more about how I use Ansible? Register for my upcoming free email course.

summary: null field_daily_email_cta: { }