{"id":6503,"date":"2022-12-10T10:32:57","date_gmt":"2022-12-10T01:32:57","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=6503"},"modified":"2022-12-17T11:36:37","modified_gmt":"2022-12-17T02:36:37","slug":"ansible%e3%81%ae%e5%88%9d%e6%9c%9f%e8%a8%ad%e5%ae%9a%e3%81%a8%e5%8b%95%e4%bd%9c%e7%a2%ba%e8%aa%8d%e3%82%92%e8%a1%8c%e3%81%86%ef%bc%81","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/6503","title":{"rendered":"Ansible\u306e\u521d\u671f\u8a2d\u5b9a\u3068\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3046\uff01"},"content":{"rendered":"<p>Ansible\u306e\u52d5\u4f5c\u78ba\u8a8d\u3092\u3059\u308b\u305f\u3081\u306e\u521d\u671f\u8a2d\u5b9a\u3068\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2>ansible.cfg\u306e\u8a2d\u5b9a\u3092\u884c\u3046\uff01<\/h2>\n<p>ansible\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3001ansible.cfg\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ cat ansible.cfg\r\n&#x5B;defaults]\r\nhost_key_checking = False\r\n<\/pre>\n<h2>ansible\u30b3\u30de\u30f3\u30c9\u3067\u52d5\u4f5c\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ ansible localhost -m ping\r\n&#x5B;WARNING]: No inventory was parsed, only implicit localhost is available\r\nlocalhost | SUCCESS =&gt; {\r\n    &quot;changed&quot;: false,\r\n    &quot;ping&quot;: &quot;pong&quot;\r\n}\r\n<\/pre>\n<h2>ansible-playbook\u30b3\u30de\u30f3\u30c9\u3067\u52d5\u4f5c\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>localhost\u306e\u307f\u8a18\u8f09\u3057\u305f\u30a4\u30f3\u30d9\u30f3\u30c8\u30ea\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002localhost\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ cat inventory_localhost.ini \r\n&#x5B;servers_localhost]\r\nlocalhost\r\n<\/pre>\n<p>\u4ee5\u4e0b\u306e\u30d7\u30ec\u30a4\u30d6\u30c3\u30af\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ cat ping_all.yml \r\n---\r\n- hosts: all\r\n  tasks: \r\n  - name: ping all\r\n    ping:\r\n<\/pre>\n<p>ansible-playbook\u30b3\u30de\u30f3\u30c9\u3067\u30d7\u30ec\u30a4\u30d6\u30c3\u30af\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ ansible-playbook -i inventory_localhost.ini ping_all.yml\r\n\r\nPLAY &#x5B;all] *************************************************************************************************************\r\n\r\nTASK &#x5B;Gathering Facts] *************************************************************************************************\r\nok: &#x5B;localhost]\r\n\r\nTASK &#x5B;ping all] ********************************************************************************************************\r\nok: &#x5B;localhost]\r\n\r\nPLAY RECAP *************************************************************************************************************\r\nlocalhost                  : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   \r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>ansible\u30b3\u30de\u30f3\u30c9\u3068ansible-playbook\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u7528\u3067\u304d\u308b\u3053\u3068\u3092\u3001ping\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h2>\u53c2\u8003\u60c5\u5831<\/h2>\n<ul>\n<li><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/index.html\" target=\"_blank\" rel=\"noopener\">Ansible Documentation<\/a><\/li>\n<\/ul>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/6710\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Ansible\u3067\u69cb\u6210\u7ba1\u7406\u3092\u884c\u3046\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2022\/12\/eyecatch_ansible_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Ansible\u3067\u69cb\u6210\u7ba1\u7406\u3092\u884c\u3046\uff01<\/div><div class=\"substr\">Ansible\u3067\u30b7\u30b9\u30c6\u30e0\u306e\u69cb\u6210\u7ba1\u7406\u3092\u884c\u3046\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<h2>Ansible\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<h3>Ansible\u5b9f\u8df5\u30ac\u30a4\u30c9 \u7b2c3\u7248 impress top gear\u30b7\u30ea\u30fc\u30ba<\/h3>\n<p><iframe style=\"width: 120px; height: 240px;\" sandbox=\"allow-popups allow-scripts allow-modals allow-forms allow-same-origin\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=infotecr-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=B07YXYM94G&amp;linkId=c592827d0a9befa45003dc1710db5e20\"><\/iframe><\/p>\n<h3>Ansible\u30af\u30c3\u30af\u30d6\u30c3\u30af impress top gear\u30b7\u30ea\u30fc\u30ba<\/h3>\n<p><iframe style=\"width: 120px; height: 240px;\" sandbox=\"allow-popups allow-scripts allow-modals allow-forms allow-same-origin\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=infotecr-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=B09V4HW2LW&amp;linkId=57f8d97a138faaedd2db76907303fa17\"><\/iframe><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ansible\u306e\u52d5\u4f5c\u78ba\u8a8d\u3092\u3059\u308b\u305f\u3081\u306e\u521d\u671f\u8a2d\u5b9a\u3068\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3044\u307e\u3059\u3002 ansible.cfg\u306e\u8a2d\u5b9a\u3092\u884c\u3046\uff01 ansible\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3001ansible.cfg\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002 $ cat a\u2026<\/p>\n","protected":false},"author":1,"featured_media":6881,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[157],"tags":[],"class_list":["post-6503","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ansible"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/6503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=6503"}],"version-history":[{"count":0,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/6503\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/6881"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=6503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=6503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=6503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}