Skip to content

L0NDONER/ansible_desktop

Repository files navigation

ansible_desktop

This is a config file for Ansible to update all my computers

Overview This README provides instructions on how to use the Ansible configuration file to update all of your computers.

Requirements Ansible An inventory file that lists the computers you want to update Instructions Install Ansible. Create an inventory file that lists the computers you want to update. Save the Ansible configuration file in the same directory as your inventory file. Run the following command to update all of your computers: ansible-playbook -i inventory.yml update.yml

Code snippet

Example

Here is an example of an inventory file:

Use code with caution. Learn more [all] localhost

[desktops] desktop1 desktop2

[laptops] laptop1 laptop2

Code snippet

Here is an example of an Ansible configuration file:

Use code with caution. Learn more [defaults] inventory = inventory.yml remote_tmp = $HOME/.ansible/tmp forks = 150 sudo_user = root transport = smart

[tasks]

name: Update all packages apt: update_cache: yes upgrade: yes [handlers]

name: Clean up file: state: absent path: /var/cache/apt/archives/_ [publish] hosts: all

Code snippet

To update all of the desktops and laptops in this example, you would run the following command:

Use code with caution. Learn more ansible-playbook -i inventory.yml update.yml

Code snippet

Troubleshooting

If you encounter any problems, please see the Ansible documentation for troubleshooting tips.

I hope this helps! Ansible Logo

About

Ansible configuration for desktops and laptops

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published