diff --git a/content/ansible-modules.rst b/content/ansible-modules.rst index 21c8996f6bcfd184365bff861a4f3fdfc3d0939e..b4ffb8ece54339e6918259ec5fbfbd22bfa49197 100644 --- a/content/ansible-modules.rst +++ b/content/ansible-modules.rst @@ -6,7 +6,7 @@ Sharing Ansible modules With Ansible you're expected to share roles with the Ansible Galaxy tool (either through the `Ansible Galaxy hub <https://galaxy.ansible.com/>`_ or just using straight git repositories). This works well enough (and personally I am using -``ansible-galaxy init`` to start each new role, even those that I'm not going to +:code:`ansible-galaxy init` to start each new role, even those that I'm not going to share with the community). However, for sharing modules there is no such easy solution, or is it? @@ -23,9 +23,9 @@ that Ansible provides and that Python is my personal preference. The whole stroy is really quite simple, create a seperate git repository with the modules in it. You can put them in subdirectories and as a far as I know, there's no restriction on the hierarchy depth. In your playbook directory create -a ``library`` directory (the Ansible default, so you can change this in -``ansible.cfg``) and create an empty ``__init__.py`` file inside that directory. -Add a git submodule inside that directory and you're done. Let's see an +a :code:`library` directory (the Ansible default, so you can change this in +:code:`ansible.cfg`) and create an empty :code:`__init__.py` file inside that +directory. Add a git submodule inside that directory and you're done. Let's see an example .. code:: shell @@ -44,8 +44,8 @@ example git push Really, not that complicated. The only magic (undocumented) bit is creating a -``__init__.py`` file inside the ``library`` directory, which is a shame that the -Ansible documentation doesn't cover that. If you want to see a real-life -example, checkout my `ansible-playbooks +:code:`__init__.py` file inside the :code:`library` directory, which is a +shame that the Ansible documentation doesn't cover that. If you want to see a +real-life example, checkout my `ansible-playbooks <https://www.shore.co.il/cgit/ansible-playbooks>`_ and `ansible-modules <https://www.shore.co.il/cgit/ansible-modules>`_ git repos. diff --git a/content/ansible-python.rst b/content/ansible-python.rst index 5d1dbd55767f6df4b6137026d8478a77996a336c..49c88f1f682db4ee9c35972021d62b41ee6854b5 100644 --- a/content/ansible-python.rst +++ b/content/ansible-python.rst @@ -19,11 +19,11 @@ obvious solution was to use a nested loop, something like this: - all_hosts - '{{ item.ansible_all_ipv4_addresses }}' -However, this syntax is invalid (and other variations I tried). Using 'include' -with 'with_items' is deprecated and I didn't manage to get it to work with -registering variables as well. What I had left was programaticaly generating -a playbook, but investigating further I found that Ansible can be imported as -a Python module. +However, this syntax is invalid (and other variations I tried). Using +:code:`include` with :code:`with_items` is deprecated and I didn't manage +to get it to work with registering variables as well. What I had left was +programaticaly generating a playbook, but investigating further I found that +Ansible can be imported as a Python module. Incorperating Ansible in Python ------------------------------- diff --git a/content/pelican.rst b/content/pelican.rst index 220c1c603cce72986cfb0219d55878495263678c..084699278db87eab71d8deb25ac9aebc25df4734 100644 --- a/content/pelican.rst +++ b/content/pelican.rst @@ -95,7 +95,7 @@ and set the theme to that by adding the following to pelicanconf.py: :: THEME = "./pelican-mockingbird" -I've also edited base.html and article.html inside of pelican-mockingbird/templates to suite my liking. Next, let us add a new entry. +I've also edited :code:`base.html` and :code:`article.html` inside of :code:`pelican-mockingbird/templates` to suite my liking. Next, let us add a new entry. Adding an entry --------------- diff --git a/content/why-no-blogging.rst b/content/why-no-blogging.rst index f2d1ae7891e3721b2a9a980462d9f93ad2250a0b..3fbf231068756323061a9f55e521440f0851d2a6 100644 --- a/content/why-no-blogging.rst +++ b/content/why-no-blogging.rst @@ -8,9 +8,9 @@ I'm doing something mildly interesting and I say to myself 'This is mildly interesting, maybe someone else will find this mildly interesting.'. But 9 out of 10 times, what ever I'm doing has some code (when I say code I usually mean an Ansible playbook, a shell script or something similar) accompanying. -Instead of a lengthy blog post, I publish a git repo. The repo has a README -file, the code is documented, there's a Makefile or fabfile, you can clone and -fork the repo. It's almost always better than a blog post. +Instead of a lengthy blog post, I publish a git repo. The repo has a :code:`README` +file, the code is documented, there's a :code:`Makefile` or :code:`fabfile`, +you can clone and fork the repo. It's almost always better than a blog post. But now I have many repositories and just a few blog posts. What I'm going to do from now on is I'll publish the git repo, but add a short post announcing the