Skip to content

Commit

Permalink
feat: install cli tools without passing a flag
Browse files Browse the repository at this point in the history
- rearrange the order of installation tasks
  • Loading branch information
Goran Ninkovic committed May 27, 2024
1 parent 5c76bc6 commit dccee53
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 24 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,22 @@ cd ~/Downloads \
### Install all software

```bash
ansible-playbook ./playbook.yml -K -e username=$(whoami) -e=all=true -e "git_user_email='your@email.com'" -e "git_user_name='Your Name'"
ansible-playbook ./playbook.yml -K -e username=$(whoami) -e=all=true
```

#### If you want to change your git user.email and git user.name, pass the git related extra arguments

```bash
ansible-playbook ./playbook.yml -K -e=all=true -e username=$(whoami) -e=dev_tools_gui=true -e "git_user_email='your@email.com'" -e "git_user_name='Your Name'"
```

#### If you want to only install CLI tools, run the following command

```bash
ansible-playbook ./playbook.yml -K -e username=$(whoami) -e=cli=true -e=dev_tools_cli=true -e "git_user_email='your@email.com'" -e "git_user_name='Your Name'"
ansible-playbook ./playbook.yml -K -e username=$(whoami)
```

#### If you want to only install GUI tools, run the following command
#### If you want to also install GUI tools, run the following command

```bash
ansible-playbook ./playbook.yml -K -e username=$(whoami) -e=gui=true -e=dev_tools_gui=true -e "git_user_email='your@email.com'" -e "git_user_name='Your Name'"
Expand All @@ -58,9 +64,7 @@ ansible-playbook ./playbook.yml -K -e username=$(whoami) -e=gui=true -e=dev_tool
### Flags

- `-e all=true` - Installs everything.
- `-e dev_tools_cli=true` - Installs developer tools from `dev_tools_cli.yaml`.
- `-e dev_tools_gui=true` - Installs developer tools from `dev_tools_gui.yaml`.
- `-e cli=true` - Installs general tools from `general_use_software_cli.yaml`.
- `-e gui=true` - Installs general tools from `general_use_software_gui.yaml`.
- `-e gestures=true` - Installs general tools from `libinput_gestures.yaml`.
- `-e docker=true` - Installs and configures docker.
Expand Down
2 changes: 0 additions & 2 deletions post-installation/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
username: vagrant
vagrant_username: vagrant
dev_tools_cli: false
dev_tools_gui: false
cli: false
gui: false
docker: false
gestures: false
Expand Down
31 changes: 14 additions & 17 deletions post-installation/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,31 @@
- name: Install zsh
ansible.builtin.include_tasks: zsh.yaml

- name: Install fonts
ansible.builtin.include_tasks: fonts.yaml
when: fonts or all
- name: Install nvim
ansible.builtin.include_tasks: nvim.yaml

- name: Install vpn software
ansible.builtin.include_tasks: vpn.yaml
when: vpn or all
- name: Install CLI dev tools
ansible.builtin.include_tasks: dev_tools_cli.yaml

- name: Install general use CLI software
ansible.builtin.include_tasks: general_use_software_cli.yaml

- name: Install docker
ansible.builtin.include_tasks: docker.yaml
when: docker or all

- name: Install CLI dev tools
ansible.builtin.include_tasks: dev_tools_cli.yaml
when: dev_tools_cli or all
- name: Install fonts
ansible.builtin.include_tasks: fonts.yaml
when: fonts or gui or all

- name: Install vpn software
ansible.builtin.include_tasks: vpn.yaml
when: vpn or all

- name: Install GUI dev tools
ansible.builtin.include_tasks: dev_tools_gui.yaml
when: dev_tools_gui or all

- name: Install general use CLI software
ansible.builtin.include_tasks: general_use_software_cli.yaml
when: cli or all

- name: Install nvim
ansible.builtin.include_tasks: nvim.yaml
when: cli or all

- name: Install general use GUI software
ansible.builtin.include_tasks: general_use_software_gui.yaml
when: gui or all
Expand Down

0 comments on commit dccee53

Please sign in to comment.