From 49533cdbccc83a1da7b46dc85770e74f87e9c40f Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Tue, 19 Sep 2023 23:19:00 +0000 Subject: [PATCH] New/Modified Toots --- 111093609530864980.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 111093609530864980.md diff --git a/111093609530864980.md b/111093609530864980.md new file mode 100644 index 0000000..840421b --- /dev/null +++ b/111093609530864980.md @@ -0,0 +1,6 @@ +--- +{"id": "111093609530864980", "in_reply_to_id": null, "in_reply_to_account_id": null, "sensitive": false, "spoiler_text": "", "visibility": "public", "language": "en", "replies_count": 0, "reblogs_count": 0, "favourites_count": 1, "edited_at": null, "reblog": null, "application": null, "account": {"id": "108219415927856966", "username": "brozek", "acct": "brozek", "display_name": "Brandon Rozek", "url": "https://fosstodon.org/@brozek", "avatar": "https://cdn.fosstodon.org/accounts/avatars/108/219/415/927/856/966/original/bae9f46f23936e79.jpg", "avatar_static": "https://cdn.fosstodon.org/accounts/avatars/108/219/415/927/856/966/original/bae9f46f23936e79.jpg", "header": "https://fosstodon.org/headers/original/missing.png", "header_static": "https://fosstodon.org/headers/original/missing.png", "noindex": true, "roles": []}, "media_attachments": [], "mentions": [], "tags": [], "emojis": [], "card": {"url": "https://kkovacs.eu/ansible-lineinfile-blockinfile-in-bash/", "title": "Poor man's Ansible: lineinfile and blockinfile in bash", "description": "Two of my favorite functions in Ansible are lineinfile and blockinfile. They are extraordinarily useful when one needs to ensure that a line or a block is either replaced or put in a config file.\nlineinfile # For example, let's say one wants to enable IP forwarding in the sysctl, one can write the following task in Ansible:\n- name: Enable IP forwarding lineinfile: dest: /etc/sysctl.conf regexp: \"net.ipv4.ip_forward\" line: \"net.ipv4.ip_forward=1\" state: present What exactly this task does is:", "type": "link", "author_name": "", "author_url": "", "provider_name": "", "provider_url": "", "html": "", "width": 0, "height": 0, "image": null, "embed_url": "", "blurhash": null}, "poll": null, "syndication": "https://fosstodon.org/@brozek/111093609530864980", "date": "2023-09-19T20:05:54.023Z"} +--- +{{< unsafe >}} +
Kristof Kovacs wrote a script that emulates lineinfile from Ansible.
Now I don't need to open up a whole text editor to edit one line in a configuration file.
+{{< /unsafe >}}