Install Visual Studio Code: Manual, Homebrew, Ansible Methods — Video Tutorial
Learn how to install Visual Studio Code on macOS using manual download, Homebrew, or Ansible. Explore the pros and cons of each installation method.
Watch Video
Watch "Install Visual Studio Code: Manual, Homebrew, Ansible Methods" on YouTube
What You'll Learn
- Visual Studio Code
- Manual way
- Homebrew way
- Ansible way
- code
- execution
- idempotency
- Conclusion
- Related Articles
Full Tutorial Content
Visual Studio Code
Visual Studio Code is an excellent Free and Built Open Source IDE that speeds up any software development nowadays. It runs everywhere. The main four feature are:
- IntelliSense
- Run and Debug
- Built-in Git
- Extensions
Manual way
Manually download and install from the official website https://code.visualstudio.com/.
- Pro: easy for new users
- Cons: time-consuming to upgrade, time-consuming for multiple machines to install and upgrade

Homebrew way
Using the Homebrew package manager, you can easily search and install the visual-studio-code package.
- Pro: fast install and upgrade
- Cons: require Terminal skill, time-consuming for multiple machines installation and upgrade

Ansible way
Using Ansible, you can quickly deploy an Ansible Playbook to install the visual-studio-code package via Homebrew.
- Pro: fast install and upgrade, unlock parallel multiple machine installation
- Cons: require Terminal skill
code
- install-visualstudiocode.yml
```yaml
---
- name: install Visual Studio Code Mac Universal
hosts: all
tasks:
- name: install visual-studio-code
community.general.homebrew:
name: visual-studio-code
state: latest
update_homebrew: true
```
- inventory
```ini
localhost ansible_connection=local
```
execution
There is currently a bug in the module report, but it successfully installs Visual Studio Code.
```bash
lberton@Lucas-MBP macos % ansible-playbook -i inventory install-visualstudiocode.yml
PLAY [install Visual Studio Code Mac Universal] ***************************************
TASK [Gathering Facts] ****************************************************************
[WARNING]: Platform darwin on host localhost is using the discovered Python
interpreter at /opt/homebrew/bin/python3.10, but future installation of another Python
interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.13/reference_appendices/interpreter_discovery.html for more information.
ok: [localhost]
TASK [community.general.homebrew] *****************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": ""}
PLAY RECAP ****************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
lberton@Lucas-MBP macos %
```

idempotency
```bash
lberton@Lucas-MBP macos % ansible-playbook -i inventory install-visualstudiocode.yml
PLAY [install Visual Studio Code Mac Universal] ***************************************
TASK [Gathering Facts] ****************************************************************
[WARNING]: Platform darwin on host lo
About This Tutorial
- Author: Luca Berton
- Difficulty: Beginner
- Read time: 3 min
- Category: installation
Read the full written article: Install Visual Studio Code: Manual, Homebrew, Ansible Methods
Topics Covered
Related Video Tutorials
- Install Ansible on macOS Monterey with Homebrew — Learn how to install the latest release of Ansible and its dependencies on macOS 12.6 Monterey using the Homebrew Package Manager. Follow our step-by-step guide.
- Elevating Ansible Development with Visual Studio Code — Setting Up Visual Studio Code for Ansible YAML Development
- Install TechSmith Camtasia 2022 (Screen Recorder and Video Editor) in macOS — How to install TechSmith Camtasia (Screen Recorder and Video Editor) to macOS 12.6 Monterey format Mac Universal (Intel Chip and Apple Silicon) on a MacBook Pro M1X.
- A Preview of Ansible Journey in 2024 — Explore Ansible role in IT automation with insights into its core releases, community engagement, and upcoming events in 2024.
- AI DevOps Ansible Community on Skool — Join Luca Berton's AI DevOps Ansible Community for top-tier training in Ansible, Kubernetes, and Terraform. Access 50+ hours of courses and career support!
- Mastering Ansible-Creator: Simplify Your Ansible Collection Development — Discover how to install and use Ansible-Creator to simplify Ansible Collection development. Enhance your automation projects with this powerful tool and Visual Studio Code integration.