website-toots/111093609530864980.md
GitHub Actions Bot e3c67fe223 New/Modified Toots
2023-09-21 23:19:52 +00:00

2.4 KiB

id in_reply_to_id in_reply_to_account_id sensitive spoiler_text visibility language replies_count reblogs_count favourites_count edited_at reblog application account media_attachments mentions tags emojis card poll syndication date
111093609530864980 null null false public en 0 0 1 null null null
id username acct display_name url uri avatar avatar_static header header_static noindex roles
108219415927856966 brozek brozek Brandon Rozek https://fosstodon.org/@brozek https://fosstodon.org/users/brozek https://cdn.fosstodon.org/accounts/avatars/108/219/415/927/856/966/original/bae9f46f23936e79.jpg https://cdn.fosstodon.org/accounts/avatars/108/219/415/927/856/966/original/bae9f46f23936e79.jpg https://fosstodon.org/headers/original/missing.png https://fosstodon.org/headers/original/missing.png true
url title description language type author_name author_url provider_name provider_url html width height image image_description embed_url blurhash published_at
https://kkovacs.eu/ansible-lineinfile-blockinfile-in-bash/ Poor man's Ansible: lineinfile and blockinfile in bash 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. lineinfile # For example, let's say one wants to enable IP forwarding in the sysctl, one can write the following task in Ansible: - 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: en link 0 0 null null null
null https://fosstodon.org/@brozek/111093609530864980 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.

https://kkovacs.eu/ansible-lineinfile-blockinfile-in-bash/

{{< /unsafe >}}