website-toots/.data/111093609530864980.json
GitHub Actions Bot b7cabef7bc New/Modified Toots
2024-07-29 02:39:21 +00:00

1 line
No EOL
2.1 KiB
JSON

{"account":{"acct":"brozek","avatar":"https://cdn.fosstodon.org/accounts/avatars/108/219/415/927/856/966/original/bae9f46f23936e79.jpg","display_name":"Brandon Rozek","header":"https://fosstodon.org/headers/original/missing.png","id":"108219415927856966","uri":"https://fosstodon.org/users/brozek","url":"https://fosstodon.org/@brozek","username":"brozek"},"application":null,"card":{"author_name":"","author_url":"","blurhash":null,"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:","embed_url":"","height":0,"html":"","image":null,"image_description":"","language":"en","provider_name":"","provider_url":"","published_at":null,"title":"Poor man's Ansible: lineinfile and blockinfile in bash","type":"link","url":"https://kkovacs.eu/ansible-lineinfile-blockinfile-in-bash/","width":0},"content":"<p>Kristof Kovacs wrote a script that emulates lineinfile from Ansible.</p><p>Now I don&#39;t need to open up a whole text editor to edit one line in a configuration file. </p><p><a href=\"https://kkovacs.eu/ansible-lineinfile-blockinfile-in-bash/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" translate=\"no\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">kkovacs.eu/ansible-lineinfile-</span><span class=\"invisible\">blockinfile-in-bash/</span></a></p>","date":"2023-09-19T20:05:54.023Z","edited_at":null,"emojis":[],"favourites_count":1,"id":"111093609530864980","in_reply_to_account_id":null,"in_reply_to_id":null,"language":"en","media_attachments":[],"mentions":[],"poll":null,"reblog":null,"reblogs_count":0,"replies_count":0,"sensitive":false,"spoiler_text":"","syndication":"https://fosstodon.org/@brozek/111093609530864980","tags":[],"visibility":"public"}