-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Ansible playbook for AVR setup #40
base: main
Are you sure you want to change the base?
Conversation
Add an Ansible playbook which installs the necessary AVR libraries using apt and pip, and copies the AVRDUDE configuration to the user's home directory. Also add corresponding instructions in the README for how to run the Ansible playbook. Using an Ansible playbook is useful for two reasons: (1) it is idempotent, which means that it can be run multiple times without repeating unnecessary steps (and potentially breaking some configurations), and (2) it can be easily modified to run on remote machines, which may be helpful in the future. The current Ansible playbook can only run locally, and must be run from the repository root directory. If necessary, this can be modified in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@jackiezeng01 @wsh32 or @jack-greenberg Could one of y'all glance over this real quick before we merge it in?
I don't know enough about ansible to give a proper review, but looks simple enough. I guess my main question is "what is the advantage of using ansible over just a bash setup script?" It seems like we're only installing a few things using apt, so it seems easy enough to either automate or just have people paste in commands? Not a blocking question, so it's fine with me to merge, this is more of a question for my own personal knowledge. |
In this case, there isn't one, since the assumption with the bash scripts is that people are going to clone the repo to their machines and then run the scripts themselves. It's helpful if you ever anticipate the setup becoming more complex in the future, because the configuration-as-code setup means you can make edits to the playbook and everyone else still runs the same command. Also, if you ever anticipate needing to run setup on remote machines (e.g., set up a cloud server and do the setup there), you can use Ansible (with a bit of modification) to run the setup remotely, as long as that remote machine has SSH and Python. |
I'm definitely on board. My main concern is that adding another tool means:
I'm not as concerned about 1, but 2 is a biggie. Can there be some associated documentation on Confluence and comments in the yaml files that detail what things mean and why they are there? One good use case for me specifically will be installing Bazel, as I'm working on integrating it for our new build system. If there is documentation that I can refer to for adding Bazel to ansible so that I can try it, that'd be great! |
Sure, I'm happy to do this. I don't know if there's a way to make changes to Confluence part of this PR, but if not, I'm happy to go ahead and add more comments to the We can also chat in real time about more use cases to make sure we're on the same page. |
Add an Ansible playbook which installs the necessary AVR libraries using
apt and pip, and copies the AVRDUDE configuration to the user's home
directory. Also add corresponding instructions in the README for how to
run the Ansible playbook.
Using an Ansible playbook is useful for two reasons: (1) it is
idempotent, which means that it can be run multiple times without
repeating unnecessary steps (and potentially breaking some
configurations), and (2) it can be easily modified to run on remote
machines, which may be helpful in the future.
The current Ansible playbook can only run locally, and must be run from
the repository root directory. If necessary, this can be modified in the
future.