{"id":1491,"date":"2019-11-30T22:44:58","date_gmt":"2019-11-30T19:44:58","guid":{"rendered":"https:\/\/artem.services\/?p=1491"},"modified":"2019-12-01T01:14:40","modified_gmt":"2019-11-30T22:14:40","slug":"ansible-%d0%be%d1%82%d0%ba%d0%bb%d1%8e%d1%87%d0%b8%d1%82%d1%8c-swap","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=1491","title":{"rendered":"Ansible &#8212; \u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c Swap"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1393\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2019\/08\/ansible-logo.png\" alt=\"\" width=\"1280\" height=\"720\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2019\/08\/ansible-logo.png 1280w, https:\/\/artem.services\/wp-content\/uploads\/2019\/08\/ansible-logo-300x169.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2019\/08\/ansible-logo-768x432.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2019\/08\/ansible-logo-1024x576.png 1024w, https:\/\/artem.services\/wp-content\/uploads\/2019\/08\/ansible-logo-954x537.png 954w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 <strong>Playbook<\/strong> \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 <strong>Swap<\/strong> \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 &quot;<strong>\/etc\/fstab<\/strong>&quot;<\/p>\n<p>&nbsp;<\/p>\n<h3>swap_disable.yaml<\/h3>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n---\r\n- name: Disable Swap\r\n  gather_facts: No\r\n  hosts: localhost\r\n\r\n  tasks:\r\n    - name: Disable SWAP\r\n      shell:\r\n        cmd: |\r\n          swapoff -a\r\n      args:\r\n        executable: \/bin\/bash\r\n\r\n    - name: Remove Swap from fstab\r\n      mount:\r\n        name: swap\r\n        fstype: swap\r\n        state: absent\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c <strong>Playbook<\/strong>:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nansible-playbook docker.yaml\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u0430\u043d\u043d\u044b\u0439 Playbook \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 Swap \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 &quot;\/etc\/fstab&quot; &nbsp; swap_disable.yaml &nbsp; \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c Playbook:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1109],"tags":[1111,1113,59],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1491"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1491"}],"version-history":[{"count":3,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1491\/revisions"}],"predecessor-version":[{"id":1498,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1491\/revisions\/1498"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}