{"id":5199,"date":"2017-09-20T10:22:39","date_gmt":"2017-09-20T01:22:39","guid":{"rendered":"http:\/\/www.lancard.com\/blog\/?p=5199"},"modified":"2025-03-12T11:26:30","modified_gmt":"2025-03-12T02:26:30","slug":"scaleway-centos7base","status":"publish","type":"post","link":"https:\/\/www.lancard.com\/blog\/2017\/09\/20\/scaleway-centos7base\/","title":{"rendered":"Vagrant+Ansible\u3067CentOS7\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u307e\u3067"},"content":{"rendered":"<p>murave\u3067\u3059\u3002\u3053\u3053\u6700\u8fd1\u306e\u8a18\u4e8b\u3001<\/p>\n<ul>\n<li><a href=\"http:\/\/www.lancard.com\/blog\/2017\/09\/08\/vagrant%E3%81%A7scaleway%E4%BD%BF%E3%81%86%E3%81%A8%E9%96%8B%E7%99%BA%E3%81%AB%E4%BE%BF%E5%88%A9%E3%81%AA%E3%81%AE%E3%81%A7%E3%81%AF%EF%BC%9F%E3%81%A8%E3%81%84%E3%81%86%E8%A9%B1\/\" target=\"_blank\">Vagrant\u3067Scaleway\u4f7f\u3046\u3068\u958b\u767a\u306b\u4fbf\u5229\u306a\u306e\u3067\u306f\uff1f\u3068\u3044\u3046\u8a71<\/a><\/li>\n<li><a href=\"http:\/\/www.lancard.com\/blog\/2017\/09\/15\/centos7-%e3%81%a7%e3%81%ae-yum-security-update-%e4%ba%8b%e6%83%85\/\" target=\"_blank\">CentOS7 \u3067\u306e yum \u2013security update \u4e8b\u60c5<\/a><\/li>\n<\/ul>\n<p>\u306b\u3064\u3044\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u5316\u3057\u3066GitHub\u3067\u516c\u958b\u3057\u307e\u3057\u305f<\/p>\n<p><a href=\"https:\/\/github.com\/jmurabe\/scaleway-centos7base\" target=\"_blank\">jmurabe\/scaleway-centos7base<\/a><\/p>\n<p>\u30af\u30e9\u30a6\u30c9(Scaleway)\u4e0a\u3067\u52d5\u304b\u3059\u306e\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u78ba\u4fdd\u306e\u305f\u3081\u306b yum update \u3059\u308b\u3079\u304d\u3002\u3057\u304b\u3057\u5168\u90e8\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3068\u6642\u9593\u304c\u304b\u304b\u308a\u3059\u304e\u308b\u3002\u305d\u3053\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u51fa\u6765\u308b\u3088\u3046\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u3066\u5b9f\u884c\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u81ea\u52d5\u3067\u3001\u3068\u3044\u3046\u5185\u5bb9\u3067\u3059\u3002<\/p>\n<p>\u51aa\u7b49\u6027\u304c\u78ba\u4fdd\u3067\u304d\u3066\u3044\u308b\u3068\u306f\u8a00\u3044\u96e3\u3044\u6240\u306f\u3042\u308a\u307e\u3059\u304c(\/security\u304c\u5b58\u5728\u3059\u308b\u304b\uff1f\u3060\u3051\u3067security\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u304b\u5224\u65ad\u3057\u3066\u3044\u308b\u7b49)\u3001\u30d9\u30fc\u30b9\u3068\u3057\u3066\u306f\u4f7f\u3048\u308b\u3068\u304a\u3082\u3044\u307e\u3059\u3002<\/p>\n<p><!--more--><br \/>\n\u5b9f\u884c\u3059\u308b\u3068\u3053\u3093\u306a\u611f\u3058(\u4e00\u90e8\u4f0f\u305b\u3066\u307e\u3059)\u3002<\/p>\n<pre><code>$ git clone git@github.com:jmurabe\/scaleway-centos7base.git\nCloning into 'scaleway-centos7base'...\nremote: Counting objects: 15, done.\nremote: Compressing objects: 100% (11\/11), done.\nremote: Total 15 (delta 0), reused 15 (delta 0), pack-reused 0\nReceiving objects: 100% (15\/15), done.\n\n$ cd scaleway-centos7base \n\n$ cp .env.example .env\n<\/code><\/pre>\n<p>.env \u306e\u5185\u5bb9\u3092\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code>$ vagrant up\nBringing machine 'default' up with 'scaleway' provider...\n==&gt; default: Creating a server with the following settings...\n==&gt; default:  -- Commercial Type: VC1S\n==&gt; default:  -- Image: 9103368e-4fab-4243-aa8d-18121796c086\n==&gt; default:  -- Name: scw-******\n==&gt; default: Starting the server...\n==&gt; default: Waiting for server to become \"ready\"...\n==&gt; default: Waiting for SSH to become available...\n==&gt; default: Machine is booted and ready for use!\n==&gt; default: [vagrant-hostsupdater] Checking for host entries\n==&gt; default: Rsyncing folder: \/Users\/murave\/scaleway\/centos7base\/ =&gt; \/vagrant\n==&gt; default: Running provisioner: ansible...\n    default: Running ansible-playbook...\n\nPLAY [all] *********************************************************************\n\nTASK [Gathering Facts] *********************************************************\nok: [default]\n\nTASK [centos7common : installs] ************************************************\nchanged: [default] =&gt; (item=[u'yum-utils', u'git', u'unzip', u'libselinux-python', u'libsemanage-python', u'policycoreutils-python'])\n\nTASK [centos7secup : install on yum security update] ***************************\nchanged: [default] =&gt; (item=[u'yum-plugin-security', u'createrepo', u'bzip2'])\n\nTASK [centos7secup : check \/security exists] ***********************************\nok: [default]\n\nTASK [centos7secup : make \/security] *******************************************\nchanged: [default]\n\nTASK [centos7secup : create repo for CEFS project] *****************************\nchanged: [default]\n\nTASK [centos7secup : download vmfarms\/generate_updateinfo] *********************\nchanged: [default]\n\nTASK [centos7secup : download CEFS errata.latest.xml.bz2] **********************\nchanged: [default]\n\nTASK [centos7secup : update CEFS project repo and yum security update] *********\nchanged: [default]\n\nPLAY RECAP *********************************************************************\ndefault                    : ok=9    changed=7    unreachable=0    failed=0   \n\n<\/code><\/pre>\n<p>HostName(IP)\u306fssh-config\u3067\u78ba\u8a8d\u3059\u308b\u306e\u304c\u4fbf\u5229\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<pre><code>$ vagrant ssh-config\nHost default\n  HostName ***.***.***.***\n  User root\n  Port 22\n  UserKnownHostsFile \/dev\/null\n  StrictHostKeyChecking no\n  PasswordAuthentication no\n  IdentityFile \/Users\/murave\/.ssh\/id_rsa\n  IdentitiesOnly yes\n  LogLevel FATAL\n<\/code><\/pre>\n<h2>\u4f59\u8ac7<\/h2>\n<h3>centos7common\u3068SELinux\u306b\u3064\u3044\u3066<\/h3>\n<p>centos7common\u3067SELinux\u5236\u5fa1\u7d61\u307f\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7b49\u3092\u5165\u308c\u3066\u308b\u306e\u306f\u74b0\u5883\u69cb\u7bc9\u6642\u306b\u5fc5\u8981\u306b\u306a\u308b\u3060\u308d\u3046\u3068\u3044\u3046\u7406\u7531\u3067\u306a\u3093\u3067\u3059\u304c\u3001\u5b9f\u306f\u6307\u5b9a\u3057\u3066\u3044\u308bScaleway\u306e\u30a4\u30e1\u30fc\u30b8\u304b\u3089\u8d77\u52d5\u3059\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u306fSELinux\u306f\u7121\u52b9\u3068\u306a\u3063\u3066\u3044\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<pre><code>$ vagrant ssh\nLast login: Tue Sep 19 08:41:21 2017 from 114.160.75.94\n[root@scw-****** ~]# getenforce\nDisabled\n<\/code><\/pre>\n<p>SELinux\u95a2\u4fc2\u306fVirtualBox\u3067\u8a66\u3057\u3066\u3044\u3066\u8ffd\u52a0\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u3082\u305d\u3082centos7common\u81ea\u4f53\u306e\u5185\u5bb9\u304c\u8584\u3044\u306e\u3067\u3053\u308c\u3092\u306a\u304f\u3057\u3066\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5fc5\u8981\u306aRole\u3059\u3079\u3066\u306binstall\u3092\u66f8\u3044\u305f\u307b\u3046\u304cRole\u306e\u518d\u5229\u7528\u6027\u304c\u9ad8\u307e\u308b\u6c17\u3082\u3057\u3066\u3044\u307e\u3059\u3002\u3067\u3082\u3001Role\u306e\u4f9d\u5b58\u6027\u3092\u5168\u3066\u306a\u304f\u305d\u3046\u3068\u3059\u308b\u306e\u306f\u9006\u52b9\u679c\u3067\u3059\u3057\u306d\u3047\u3002<\/p>\n<h3>Scaleway\u306eSecurity group\u306b\u3064\u3044\u3066<\/h3>\n<p>\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u8d77\u52d5\u3057\u305fScaleway\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u306f\u3001Default security group \u304c\u8a2d\u5b9a\u3055\u308c\u308b\u304b\u3068\u304a\u3082\u3044\u307e\u3059\u306e\u3067(ORGANIZATION DEFAULT\u3092\u5909\u66f4\u3057\u3066\u3044\u306a\u3051\u308c\u3070)\u3001\u3053\u306e\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u4e8b\u524d\u306b\u8abf\u6574\u3057\u3066\u304a\u304f\u3068\u826f\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>Scaleway\u306eSecurity group\u306e\u5909\u66f4\u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8d77\u52d5\u6642\u3057\u304b\u53cd\u6620\u3055\u308c\u306a\u3044\u3088\u3046\u306a\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044(\u7a3c\u50cd\u4e2d\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u9069\u7528\u3059\u308b\u306b\u306f\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d1\u30cd\u30eb\u304b\u3089\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u306a\u304a\u3055\u306a\u3044\u3068\u30c0\u30e1\u3063\u307d\u3044)<\/p>\n<h3>\u52d5\u4f5c\u306e\u8a73\u7d30\u3092\u78ba\u8a8d\u3057\u305f\u3044\u6642<\/h3>\n<p>Vagrantfile\u306e<\/p>\n<pre><code>  config.vm.provision \"ansible\" do |ansible|\n    ansible.playbook = \"provisioning\/playbook.yml\"\n    #ansible.verbose = \"extra\"\n    ansible.limit = 'all'\n  end\n<\/code><\/pre>\n<p>\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3044\u308b ansible.verbose = &#8220;extra&#8221; \u3092\u751f\u304b\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5199&#038;t=Vagrant%2BAnsible%E3%81%A7CentOS7%E3%81%AE%E3%82%BB%E3%82%AD%E3%83%A5%E3%83%AA%E3%83%86%E3%82%A3%E3%82%A2%E3%83%83%E3%83%97%E3%83%87%E3%83%BC%E3%83%88%E3%81%BE%E3%81%A7&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5199&#038;p&#091;images&#093;&#091;0&#093;=&#038;p&#091;title&#093;=Vagrant%2BAnsible%E3%81%A7CentOS7%E3%81%AE%E3%82%BB%E3%82%AD%E3%83%A5%E3%83%AA%E3%83%86%E3%82%A3%E3%82%A2%E3%83%83%E3%83%97%E3%83%87%E3%83%BC%E3%83%88%E3%81%BE%E3%81%A7\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"http:\/\/twitter.com\/share?url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5199&#038;text=Vagrant%2BAnsible%E3%81%A7CentOS7%E3%81%AE%E3%82%BB%E3%82%AD%E3%83%A5%E3%83%AA%E3%83%86%E3%82%A3%E3%82%A2%E3%83%83%E3%83%97%E3%83%87%E3%83%BC%E3%83%88%E3%81%BE%E3%81%A7\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5199&#038;title=Vagrant%2BAnsible%E3%81%A7CentOS7%E3%81%AE%E3%82%BB%E3%82%AD%E3%83%A5%E3%83%AA%E3%83%86%E3%82%A3%E3%82%A2%E3%83%83%E3%83%97%E3%83%87%E3%83%BC%E3%83%88%E3%81%BE%E3%81%A7\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-tumblr nolightbox\" data-provider=\"tumblr\" target=\"_blank\" rel=\"nofollow\" title=\"Share on tumblr\" href=\"https:\/\/tumblr.com\/share?s=&#038;v=3&#038;t=Vagrant%2BAnsible%E3%81%A7CentOS7%E3%81%AE%E3%82%BB%E3%82%AD%E3%83%A5%E3%83%AA%E3%83%86%E3%82%A3%E3%82%A2%E3%83%83%E3%83%97%E3%83%87%E3%83%BC%E3%83%88%E3%81%BE%E3%81%A7&#038;u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5199\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"tumblr\" title=\"Share on tumblr\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/tumblr.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Vagrant%2BAnsible%E3%81%A7CentOS7%E3%81%AE%E3%82%BB%E3%82%AD%E3%83%A5%E3%83%AA%E3%83%86%E3%82%A3%E3%82%A2%E3%83%83%E3%83%97%E3%83%87%E3%83%BC%E3%83%88%E3%81%BE%E3%81%A7&#038;body=%E3%82%B7%E3%82%A7%E3%82%A2%E3%81%99%E3%82%8B%EF%BC%9A:%20https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F5199\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>murave\u3067\u3059\u3002\u3053\u3053\u6700\u8fd1\u306e\u8a18\u4e8b\u3001 Vagrant\u3067Scaleway\u4f7f\u3046\u3068\u958b\u767a\u306b\u4fbf\u5229\u306a\u306e\u3067\u306f\uff1f\u3068\u3044\u3046\u8a71 CentOS7 \u3067\u306e yum \u2013security update \u4e8b\u60c5 \u306b\u3064\u3044\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u5316\u3057\u3066GitHub\u3067\u516c\u958b\u3057\u307e [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[171,136,169,116,170],"class_list":["post-5199","post","type-post","status-publish","format-standard","hentry","category-server","tag-ansible","tag-centos","tag-scaleway","tag-vagrant","tag-yum"],"_links":{"self":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/5199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/comments?post=5199"}],"version-history":[{"count":4,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/5199\/revisions"}],"predecessor-version":[{"id":5203,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/5199\/revisions\/5203"}],"wp:attachment":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/media?parent=5199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/categories?post=5199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/tags?post=5199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}