This is an ansible playbook to configure my working environment.
work
Folderubuntu-dev
expects the projects in/home/<user>/work
.
You can create the work
folder locally,
but i recommend using an external folder,
because that makes it easier and faster to recreate your work in fresh box,
in case you screw it up in some way or other.
For myself i use an SD-Card wich i configure to be mounted to /home/<user>/work
.
(Hint: If your host is Windows 10, you should disable "USB Settings -> stop devices when my screen is off ...", to avoid losing the mounted device in the quest.)
ubuntu-dev
to work
Unless, of cource, it is there already, because you are reusing the work folder as described above.
On the quest, navigate to the project folder:
cd work/ubuntu-dev
Just copy the template and adjust it for your environment:
cp sample-ubuntu-dev-vars.yml ~/.ubuntu-dev-vars.yml
Probably you should replace my SSH public key with yours. Well ... unless you want met to visit your machine. And then ... TADAAAA ... you can run the playbook:
./run-ansible.sh
WARNING: This may take a while. Actually some hours, because it includes an installation of TexLive. You may want to exlude that when running this for the first time:
./run-ansible.sh --skip-tags heavy
You can rerun the playbook any time.
./run-ansible.sh --list-tags --list-tasks
I have assigned some tags to enable selective execution of tasks.
install
- everythingheavy
- things that may take long, e.g. installing TexLive.configure
- configuring the environmentIf everything is installed and you want to try some configuration changes, just run:
./run-ansible.sh --tags configure
.bashrc
: https://docs.ansible.com/ansible/blockinfile_module.htmlCopyright 2016 Bjørn Stachmann
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.