{"id":44412,"date":"2023-02-27T22:38:56","date_gmt":"2023-04-13T03:21:14","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/"},"modified":"2024-01-15T12:04:50","modified_gmt":"2024-01-15T04:04:50","slug":"%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/","title":{"rendered":"\u4f7f\u7528Ansible\u5728CentOS7\u4e0a\u5b89\u88c5Vuls"},"content":{"rendered":"<p>\u6211\u7f16\u5199\u4e86\u4e00\u4e2a\u4f7f\u7528 Ansible \u5c06 Vuls \u5b89\u88c5\u5230 CentOS7 \u7684 Playbook\u3002\u4ec5\u9002\u7528\u4e8e\u5728\u672c\u5730\u4e3b\u673a\u4e0a\u6267\u884c\u3002<\/p>\n<p>\u6211\u6309\u7167 Vuls \u5b98\u65b9\u7684\u5b89\u88c5\u6b65\u9aa4\u8fdb\u884c\u3002<\/p>\n<h3>\u8fd0\u52a8\u73af\u5883<\/h3>\n<p>\u4ee5\u4e0b\u662f\u57fa\u4e8e\u6b64\u8fdb\u884c\u89e3\u91ca\u7684\u57fa\u672c\u5185\u5bb9\u3002<\/p>\n<p>CentOS 7.4\u4e4b\u540e<br \/>\nAnsible 2.5\u4e4b\u540e\uff08\u4e0d\u652f\u63012.4\u7248\u672c\u53ca\u4ee5\u524d\u7684\uff09<\/p>\n<h3>\u5b89\u88c5 Ansible<\/h3>\n<p>\u6267\u884c\u6839\u76ee\u5f55\u3002\u5982\u679c\u4f7f\u7528sudo\uff0c\u8bf7\u6839\u636e\u9700\u8981\u8fdb\u884c\u66f4\u6539\u3002<\/p>\n<pre class=\"post-pre\"><code># yum -y install epel-release\r\n# yum -y install ansible\r\n# ansible --version\r\n<\/code><\/pre>\n<h3>\u5b89\u88c5Vuls<\/h3>\n<p>\u547d\u4ee4\u5c06\u4ee5root\u6743\u9650\u8fd0\u884c\u3002\u5982\u9700\u4f7f\u7528sudo\uff0c\u8bf7\u76f8\u5e94\u66f4\u6539\u3002<\/p>\n<p>\u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3avuls\u7684\u7528\u6237\u3002\u7136\u540e\uff0c\u4ece\u6211\u7ba1\u7406\u7684Github\u4ed3\u5e93\u4e2d\u83b7\u53d6playbook\u3002<\/p>\n<pre class=\"post-pre\"><code># useradd vuls\r\n# cd \/home\/vuls\r\n# git clone https:\/\/github.com\/TomonoriMatsumura\/ansible-vuls.git\r\n# cd ansible-vuls\r\n# ansible-playbook -i localhost.cfg site.yml\r\n<\/code><\/pre>\n<h3>\u8fd0\u884cvuls<\/h3>\n<p>\u53ea\u6709vuls\u7528\u6237\u80fd\u591f\u6267\u884c\u3002<\/p>\n<pre class=\"post-pre\"><code>$ su vuls\r\n$ vuls\r\n<\/code><\/pre>\n<h3>\u5173\u4e8evars\u6587\u4ef6\u3002<\/h3>\n<p>\u5728\u6267\u884cansible playbook\u65f6\uff0c\u9700\u8981\u8bbe\u7f6e\u7684\u53d8\u91cf\u5df2\u7ecf\u914d\u7f6e\u5982\u4e0b\u3002\u8def\u5f84\u4e3a\u300cansible\/vars\/vuls\/install\/default.yml\u300d\u3002<\/p>\n<pre class=\"post-pre\"><code>work_dir: \/tmp\/vuls-install-dir\r\nvuls_user: vuls\r\ngo_path: \"\/home\/{{ vuls_user}}\/go\"\r\n\r\nfirst_year: 2018\r\n<\/code><\/pre>\n<ul class=\"post-ul\">work_dir<\/ul>\n<p>\u5de5\u4f5c\u76ee\u5f55<\/p>\n<ul class=\"post-ul\">vuls_user<\/ul>\n<p>\u6267\u884cVuls\u7684\u7528\u6237\u540d<\/p>\n<ul class=\"post-ul\">go_path<\/ul>\n<p>Golang\u7684\u5b89\u88c5\u8def\u5f84<\/p>\n<ul class=\"post-ul\">first_year<\/ul>\n<p>\u8bbe\u7f6e\u83b7\u53d6\u8106\u5f31\u6027\u6587\u4ef6\u7684\u65f6\u95f4\u6bb5\u3002\u53ea\u80fd\u6307\u5b9a\u65f6\u95f4\u6bb5\u7684\u5f00\u59cb\u3002\u65f6\u95f4\u6bb5\u7684\u7ed3\u675f\u5e74\u4efd\u5c06\u7531Playbook\u81ea\u52a8\u83b7\u53d6\u3002<\/p>\n<p>\u521d\u671f\u8bbe\u7f6e\u662f\u57282018\u5e74\u81f32019\u5e74\u4e4b\u95f4\u3002\uff08\u622a\u6b62\u81f32018\u5e74\uff09\u6211\u4eec\u4f1a\u6839\u636e\u9700\u8981\u8fdb\u884c\u76f8\u5e94\u8c03\u6574\u3002\u8bbe\u5b9a\u4e3a\u4ece2016\u5e74\u81f3\u4eca\u5927\u7ea63\u5e74\u5de6\u53f3\u7684\u65f6\u95f4\u6bb5\u53ef\u80fd\u662f\u5408\u7406\u7684\u3002<\/p>\n<h3>\u5173\u4e8eGolang<\/h3>\n<p>Vuls\u4f7f\u7528\u7684Golang\u59cb\u7ec8\u5b89\u88c5\u6700\u65b0\u7248\u672c\u3002\u5b83\u4f1a\u89e3\u6790Golang\u7684Dockerfile\u6765\u83b7\u53d6\u6700\u65b0\u7684\u7248\u672c\u4fe1\u606f\u3002<\/p>\n<h3>\u53c2\u8003\u7f51\u7ad9<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Install Manually on CentOS \u00b7 Vuls<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">docker-library\/golang: Docker Official Image packaging for golang<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u7f16\u5199\u4e86\u4e00\u4e2a\u4f7f\u7528 Ansible \u5c06 Vuls \u5b89\u88c5\u5230 CentOS7 \u7684 Playbook\u3002\u4ec5\u9002\u7528\u4e8e\u5728\u672c\u5730\u4e3b [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-44412","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528Ansible\u5728CentOS7\u4e0a\u5b89\u88c5Vuls - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ansible\u5728centos7\u4e0a\u5b89\u88c5vuls\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528Ansible\u5728CentOS7\u4e0a\u5b89\u88c5Vuls\" \/>\n<meta property=\"og:description\" content=\"\u6211\u7f16\u5199\u4e86\u4e00\u4e2a\u4f7f\u7528 Ansible \u5c06 Vuls \u5b89\u88c5\u5230 CentOS7 \u7684 Playbook\u3002\u4ec5\u9002\u7528\u4e8e\u5728\u672c\u5730\u4e3b [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ansible\u5728centos7\u4e0a\u5b89\u88c5vuls\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-13T03:21:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T04:04:50+00:00\" \/>\n<meta name=\"author\" content=\"\u97f5, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u97f5, \u79d1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/\",\"name\":\"\u4f7f\u7528Ansible\u5728CentOS7\u4e0a\u5b89\u88c5Vuls - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-04-13T03:21:14+00:00\",\"dateModified\":\"2024-01-15T04:04:50+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528Ansible\u5728CentOS7\u4e0a\u5b89\u88c5Vuls\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\",\"name\":\"\u97f5, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"caption\":\"\u97f5, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528Ansible\u5728CentOS7\u4e0a\u5b89\u88c5Vuls - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ansible\u5728centos7\u4e0a\u5b89\u88c5vuls\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528Ansible\u5728CentOS7\u4e0a\u5b89\u88c5Vuls","og_description":"\u6211\u7f16\u5199\u4e86\u4e00\u4e2a\u4f7f\u7528 Ansible \u5c06 Vuls \u5b89\u88c5\u5230 CentOS7 \u7684 Playbook\u3002\u4ec5\u9002\u7528\u4e8e\u5728\u672c\u5730\u4e3b [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ansible\u5728centos7\u4e0a\u5b89\u88c5vuls\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-04-13T03:21:14+00:00","article_modified_time":"2024-01-15T04:04:50+00:00","author":"\u97f5, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u97f5, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/","name":"\u4f7f\u7528Ansible\u5728CentOS7\u4e0a\u5b89\u88c5Vuls - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-04-13T03:21:14+00:00","dateModified":"2024-01-15T04:04:50+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528Ansible\u5728CentOS7\u4e0a\u5b89\u88c5Vuls"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e","name":"\u97f5, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","caption":"\u97f5, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ansible%e5%9c%a8centos7%e4%b8%8a%e5%ae%89%e8%a3%85vuls%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=44412"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44412\/revisions"}],"predecessor-version":[{"id":59309,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44412\/revisions\/59309"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=44412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=44412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=44412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}