CodelyTV / dotfiles

🐢 💨 Speedup your MacOS setup with this fine tuning settings
https://codely.tv
MIT License
305 stars 54 forks source link

Idea: Ansible playbook to provision your laptop #5

Closed xserrat closed 5 years ago

xserrat commented 5 years ago

Hi @JavierCane and @rgomezcasas,

I've found an Ansible playbook that makes something similar and it could be a way to take advantage of Ansible to provision any machine.

The main repository is this one: https://github.com/geerlingguy/mac-dev-playbook. But this repository uses some roles created by the same author:

I hope it can be useful!

JavierCane commented 5 years ago

Hi @xserrat!

Firstly, thanks a lot for your suggestion, we really appreciate it and it has made us think about how we can evolve this little project 😊

Needs

You're completely right about the need of finding some way to parametrize some configuration such as:

Why Ansible couldn't be the best tool

Having that into account, we're not sure about Ansible being the best tool for the job. Concerns about it (please, correct me if I'm wrong in any of these assumptions):

Alternative suggestion

So in conclusion, we would prefer to automate it with something simpler. Maybe just a bash script which:

  1. Checks if there's a config.env file at the project root (ignored in Git by default by a .gitignore entry)
  2. If this file doesn't exists, ask the user for each one of the values defined by default in the config.env.dist file, and generate the final config.env with the specified values (these config parameters would be the ones specified in the begining of this comment)
  3. Once we have the config.env generated, it would only have to set them as environment variables, and execute the install tasks
  4. Ask the user for confirmation before executing each one of the install steps
  5. Ask the user to tweet about the tool with something like "I've just used @CodelyTV/dotfiles to setup my computer in a matter of seconds! 🤟🚀" :P

Call to action

What do you think about the script? Would you dare to give it a try in a PR? 😬

tenor-205335316

This is the best gif I found to say "We need you" in a funny and subliminal way 😬

xserrat commented 5 years ago

Thank you @JavierCane for your answer 😬

You're totally right about it.

The need to have Ansible installed and the complexity at the beginning are good reasons to use an alternative way to do it. I've suggested Ansible because when you know how it works (a little bit), it's really easy to create a configuration script without too much effort (thanks to the modules and other stuff).

But it's true that an end user just wants to change some parameters in an easy way, and if the project is as simple as possible, the satisfaction will be better 🥳

So, I'm going to try to create a bash script to do it (I'm not an experienced bash programmer but it's a nice way to learn! 🤓).

Thanks again! 👏👏

JavierCane commented 5 years ago

That's awesome!!! 😬😬😬

I'll close this issue regarding the Ansible proposal. Free free to open the PR whenever you consider 🙂🤘