From 87147913673474c65172a61ff1950606e38e3799 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Thu, 23 Jun 2016 21:06:52 +0300 Subject: [PATCH] - Added a section on boilerplate/ scaffloding to the ansible-example-role post. --- content/ansible-example-role.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/content/ansible-example-role.rst b/content/ansible-example-role.rst index 859fbc7..e0a7ec8 100644 --- a/content/ansible-example-role.rst +++ b/content/ansible-example-role.rst @@ -82,3 +82,24 @@ the option to run any hypervisor. For me it's a deal breaker because I depend on VirtualBox (I need to test on different OSes, not just Linux). If LXC serves your needs than you should be able to run Vagrant with the LXC provider and therefore Molecule. For me it's a deal breaker. + +A final word on boiler-plate +---------------------------- + +In a previous post I mentioned that I have several repositories that have the +same boiler-plate and how I plan on dealing with that. Now, this is the first +attempt at this. The idea is having a base repo that I clone, add another remote +and voilĂ , a new project with the scaffloding already there. For bonus points, I +can update the base repo and pull those changes in all projects. Here's how I do +it: + +.. code:: shell + + git clone https://www.shore.co.il/git/ansible-role-example ansible-role-name + cd ansible-role-name + git remote rename origin ansible-role-example + git remote add origin git@example.com/path/to/repo + git push -u origin master + +And in case I update the ansible-role-example repo than I pull the updates by +running :code:`git pull ansible-role-example master`. -- GitLab