{"id":275896,"date":"2016-03-11T01:22:02","date_gmt":"2016-03-10T22:22:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=275896"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=275896","title":{"rendered":"Ansible \u0438 reverse-proxy \u0441\u0435\u0440\u0432\u0435\u0440\u0430"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8b3\/095\/f82\/8b3095f8262c4f46bef08adbd6a5d9bc.png\"\/><br \/>  \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u043e\u0432, \u0441 \u043c\u043d\u043e\u0433\u0438\u0445 \u043d\u043e\u0434 (n&gt;20) \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e (n&lt;=3) \u0431\u043e\u0435\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0432 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043e\u0442 \u043a\u043e\u043b\u043b\u0435\u0433\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f, \u0438 \u0432\u0441\u0435 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u044e. <br \/>  \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445.<\/p>\n<p>  \u041a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0431\u044b\u043b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043d\u043e\u0434 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0447\u043d\u044f \u0434\u043e\u043c\u0435\u043d\u043e\u0432. <br \/>  \u041f\u0440\u043e\u0444\u0438\u0442 \u043e\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0438 DNS \u0441 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0435\u0439.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u043e\u0438\u0441\u043a \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u0435\u043c\u0435 reverse-proxy, \u0447\u0430\u0441\u0442\u043e \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0441\u0442\u0430\u0442\u044c\u044f\u043c \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u201cnginx to apache\u201d (\u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 apache \u0438\u043b\u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 upstream-\u0441\u0435\u0440\u0432\u0435\u0440), CDN-\u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 (cloudflare, *cdn, cloudfront, etc.). \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b\u043e.<br \/>  \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043d\u044b\u0445 IP (\u0438\u0437 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043b\u043e\u043a\u0430\u0446\u0438\u0439) \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043e\u0434\u043d\u043e\u0433\u043e-\u0434\u0432\u0443\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. <\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u044b\u043b\u0438 \u043a\u0443\u043f\u043b\u0435\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e VPS \u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043b\u043e\u043a\u0430\u0446\u0438\u044f\u0445 (\u0434\u0435\u0448\u0435\u0432\u044b\u0435, \u0441\u043f\u0430\u0441\u0438\u0431\u043e lowendbox.com &#038; lowendstock.com, \u043d\u043e \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c \u0431\u0435\u043d\u0434\u0432\u0438\u0447\u0435\u043c). <br \/>  VPS \u043f\u043e\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430 Centos-6-x32, \u043d\u043e \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e epel \u0432\u044b\u043a\u0430\u0442\u0438\u0442 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f <a href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=42368\">Centos-7 32-bit<\/a>, \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f.<br \/>  \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 ansible.<\/p>\n<h4>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Ansible<\/h4>\n<p>  \u0412 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 <a href=\"http:\/\/docs.ansible.com\/ansible\/playbooks_best_practices.html\">\u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0439<\/a> \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439, \u0438\u043c\u0435\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:  <\/p>\n<pre><code class=\"bash\">$ find -type f .\/roles\/update_os\/tasks\/main.yml .\/roles\/update_nginx_configs\/tasks\/main.yml .\/roles\/update_nginx_configs\/files\/proxy.conf .\/roles\/update_nginx_configs\/templates\/domain.conf.j2 .\/roles\/update_nginx_configs\/handlers\/main.yml .\/roles\/update_hostname\/tasks\/main.yml .\/ansible.cfg .\/hosts .\/proxy-nodes.yml <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0444\u0430\u0439\u043b\u0430\u043c.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">.\/hosts<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>[test] localhost ansible_connection=local  [centos:children] proxy-nodes  [proxy-nodes] xxx.xxx.xxx.xxx  ansible_connection=ssh ansible_ssh_user=root  ansible_ssh_pass=xxxxxx node_hostname=proxy-node-001.www.co yyy.yyy.yyy.yyy  ansible_connection=ssh ansible_ssh_user=root  ansible_ssh_pass=yyyyyy node_hostname=proxy-node-010.www.co zzz.zzz.zzz.zzz  ansible_connection=ssh ansible_ssh_user=root  ansible_ssh_pass=zzzzzz node_hostname=proxy-node-029.www.co <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>\u0422\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u043c\u0435\u0442\u0430-\u0433\u0440\u0443\u043f\u043f\u0430 [centos] \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 [proxy-nodes] \u043a\u0430\u043a \u0434\u043e\u0447\u0435\u0440\u043d\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u043a [centos].<br \/>  \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u043c \u043d\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0440\u043e\u043b\u0435\u0439 \u0438 \u0437\u0430\u0434\u0430\u0447.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">.\/ansible.cfg<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>[defaults] pipelining                = True hostfile                  = hosts [ssh_connection] ssh_args                  = -o UserKnownHostsFile=\/dev\/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s control_path              = ~\/.ansible\/cp\/ansible-ssh-%%h-%%p-%%r <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>\u0422\u0443\u0442 \u0442\u043e\u0436\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e. <br \/>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u0434\u0435\u0442 \u043e\u0442\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c pipelining.<br \/>  hostfile \u2014 \u0434\u043b\u044f \u0443\u043c\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, <br \/>  ssh_args \u2014 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0433\u043e\u0432\u043e\u0440\u043b\u0438\u0432\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0440\u0435\u043b\u043e\u0430\u0434\u0430\u0445 \u0445\u043e\u0441\u0442\u043e\u0432, \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 persistent connection, \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u0441\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439 \u2014 ControlPath.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">ControlPath &#8212; \u043b\u0443\u0447\u0448\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0443\u0432\u0438\u0434\u0435\u0442\u044c<\/b><\/p>\n<div class=\"spoiler_text\"><b>$ ssh<\/b> -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=\/dev\/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes <b>-o ControlPath=\/tmp\/habr.socket root@192.168.124.185<\/b><br \/>  Warning: Permanently added &#8216;192.168.124.185&#8217; (RSA) to the list of known hosts.<br \/>  root@192.168.124.185&#8217;s password: <br \/>  Last login: Thu Mar 10 22:46:41 2016<br \/>  [root@test001 ~]# service sshd stop<br \/>  Stopping sshd: [ OK ]<br \/>  [root@test001 ~]# exit<br \/>  logout<br \/>  Shared connection to 192.168.124.185 closed.<br \/>  <b>$ ssh -o ControlPath=\/tmp\/habr.socket root@192.168.124.185<\/b><br \/>  Last login: Thu Mar 10 22:48:12 2016 from 192.168.124.1<br \/>  [root@test001 ~]# exit<br \/>  logout<br \/>  Shared connection to 192.168.124.185 closed.<br \/>  <b>$ ssh root@192.168.124.185<\/b><br \/>  ssh: connect to host 192.168.124.185 port 22: Connection refused<br \/>  <b>$ ssh -o ControlPath=\/tmp\/habr.socket root@192.168.124.185<\/b><br \/>  Last login: Thu Mar 10 22:48:47 2016 from 192.168.124.1<br \/>  [root@test001 ~]# service sshd start<br \/>  Starting sshd: [ OK ]<br \/>  [root@test001 ~]# exit<br \/>  logout<br \/>  Shared connection to 192.168.124.185 closed.<br \/>  <b>$ ssh root@192.168.124.185<\/b><br \/>  Warning: Permanently added &#8216;192.168.124.185&#8217; (RSA) to the list of known hosts.<br \/>  root@192.168.124.185&#8217;s password:   <\/div>\n<\/div>\n<p>\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 \u00abaccelerate: true\u00bb. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 <a href=\"http:\/\/docs.ansible.com\/ansible\/playbooks_acceleration.html\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a>, Centos 6 \u0443\u0436\u0435 <a href=\"https:\/\/rhn.redhat.com\/errata\/RHBA-2014-1854.html\">\u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0434<\/a> \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 ControlPersist, \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0438\u043d\u0441\u0442\u0430\u043b\u043b\u0430, \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043f\u0440\u0438\u043c\u0435\u0440 .\/prepare-accelerate.yml \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043d\u043e\u0434\u044b \u043a \u043e\u043f\u0446\u0438\u0438 accelerate: true \u0432 \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u0435 .\/proxy-nodes.yml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">--- - hosts: centos    tasks:    - name: install EPEL     yum: name=epel-release    - name: install keyczar     yum: name=python-keyczar<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>\u0414\u0430\u043b\u0435\u0435, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u043b\u0435\u0439\u0431\u0443\u043a, \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0440\u043e\u043b\u044f\u043c\u0438, \u0438 \u0442\u0430\u0441\u043a update_os:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">.\/proxy-nodes.yml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">--- - hosts: proxy-nodes   roles:     - update_hostname     - update_os     - update_nginx_configs <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">.\/roles\/update_os\/tasks\/main.yml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">---  - name: repo install EPEL   yum: name=epel-release  - name: repo install nginx-release-centos-6   yum: state=present name=http:\/\/nginx.org\/packages\/centos\/6\/noarch\/RPMS\/nginx-release-centos-6-0.el6.ngx.noarch.rpm  - name: packages install some   yum: name={{ item }}   with_items:     - nginx     - yum-update  - name: packages upgrade all   yum: name=* state=latest <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>\u0421\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<h4>\u0420\u043e\u043b\u044c update_hostname<\/h4>\n<p>  \u0422\u0430\u043a \u0443\u0436 \u043f\u043e\u0432\u0435\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043d\u043e\u0434\u044b \u043a\u0430\u043a-\u0442\u043e \u0438\u043c\u0435\u043d\u0443\u044e\u0442\u0441\u044f. \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u0435\u0442\u044c, \u0432 \u0444\u0430\u0439\u043b\u0435 hosts \u0443\u043a\u0430\u0437\u0430\u043d, \u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0438\u0439 \u0437\u0430 \u0441\u0435\u0431\u044f, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 node_hostname. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, ansible \u0435\u0449\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0445\u043e\u0441\u0442\u043d\u0435\u0439\u043c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 FQDN, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0442\u044c:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">.\/roles\/update_hostname\/tasks\/main.yml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">---  - name: set hostname   hostname: name={{ node_hostname }}  - name: add hostname to \/etc\/hosts   lineinfile: dest=\/etc\/hosts regexp='.*{{ node_hostname }}$' line=&quot;{{ ansible_default_ipv4.address }} {{ node_hostname }}&quot; state=present create=yes   when: ansible_default_ipv4.address is defined <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c hostname -f \u043d\u0435 \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0430\u043d\u0435\u043b\u044f\u0445 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u0420\u043e\u043b\u044c update_nginx_configs<\/h4>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0440\u043e\u043b\u044c \u2014 update_nginx_configs.<br \/>  \u0422\u0443\u0442 \u043c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0434\u043b\u044f \u0440\u0435\u043b\u043e\u0434\u0430 nginx:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">.\/roles\/update_nginx_configs\/handlers\/main.yml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">--- - name: reload nginx   service: name=nginx state=reloaded<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0437\u043e\u043d\u0443 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 http, \u0438 \u0438\u043d\u043a\u043b\u044e\u0434\u0438\u0442 \u0431\u0443\u0434\u0443\u0449\u0438\u0435 \u0434\u043e\u043c\u0435\u043d\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">.\/roles\/update_nginx_configs\/files\/proxy.conf<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">proxy_cache_path  \/tmp  levels=1:2    keys_zone=PROXY:10m inactive=24h  max_size=4g use_temp_path=off; include \/etc\/nginx\/conf.d\/proxy\/*.conf;<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0428\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">.\/roles\/update_nginx_configs\/templates\/domain.conf.j2<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">server {         listen {{  ansible_default_ipv4.address  }}:80;         server_name {{  item.domain  }} www.{{  item.domain  }};         access_log  \/var\/log\/nginx\/{{  item.domain  }}.access.log main ;         error_log   \/var\/log\/nginx\/{{  item.domain  }}.error.log;          location \/ {                 proxy_pass http:\/\/{{  item.remoteip  }}:80\/;                 proxy_redirect off;                 proxy_set_header Host $host;                 proxy_set_header X-Real-IP $remote_addr;                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;                 client_max_body_size 10m;                 proxy_connect_timeout 90;                  proxy_cache             PROXY;                 proxy_cache_valid       200 302 1d;                 proxy_cache_valid       404    30m;                 proxy_cache_valid       any     1m;                 proxy_cache_use_stale   error timeout invalid_header updating http_500 http_502 http_503 http_504;         } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>\u0422\u0443\u0442 \u0432 \u0446\u0435\u043b\u043e\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043a\u0435\u0448\u0430 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442. \u0421\u0440\u0435\u0434\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432\u0438\u0434\u0438\u043c \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438: ansible_default_ipv4.address, item.domain \u0438 item.remoteip. \u041e\u0442\u043a\u0443\u0434\u0430 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430, \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">.\/roles\/update_nginx_configs\/handlers\/main.yml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">---  - name: create non existing dir \/etc\/nginx\/conf.d\/proxy\/   file: path=\/etc\/nginx\/conf.d\/proxy\/ state=directory mode=0755  - copy: src=proxy.conf dest=\/etc\/nginx\/conf.d\/ owner=nginx group=nginx  backup=yes  - name: re-create domain templates   template: src=domain.conf.j2 dest=\/etc\/nginx\/conf.d\/proxy\/{{ item.domain }}.conf owner=nginx group=nginx  backup=yes   with_items:     - { domain: 'nginx.org'       , remoteip: '206.251.255.63' }     - { domain: 'docs.ansible.com', remoteip: '104.25.170.30'  }   notify: reload nginx  - name: validate nginx conf   command: nginx -t   changed_when: false<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u043e\u0442 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u0435 \u044d\u0442\u0430\u043f\u044b: \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438, \u0447\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0437\u043e\u043d\u044b \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441 with_items \u043f\u0440\u043e\u0448\u043b\u0438\u0441\u044c \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0430\u0440\u0430\u043c domain-remoteip \u0438 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0438.<br \/>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u0438\u0434\u0435\u0442 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0430, \u0438 \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a reload nginx. <br \/>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u0443 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 template \u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 proxy.conf.<br \/>  \u041e\u043f\u0446\u0438\u0438 validate=\u00abnginx -t -c %s\u00bb, \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 validate=\u00abnginx -t -c \/etc\/nginx\/nginx.conf -p %s\u00bb \u043d\u0435 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u0438, \u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0430 httpd.conf.<\/p>\n<h4>\u041f\u043e\u0435\u0445\u0430\u043b\u0438!<\/h4>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0432 \u0437\u0430\u0434\u0430\u0447\u0435 \u00abre-create domain templates\u00bb, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c:  <\/p>\n<blockquote><p>ansible-playbook proxy-nodes.yml <\/p><\/blockquote>\n<p>\u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043d\u043e\u0434\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:  <\/p>\n<blockquote><p>ansible-playbook proxy-nodes.yml &#8212;limit=bbb.bbb.bbb.bbb<\/p><\/blockquote>\n<p>\u0433\u0434\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c IP \u043d\u043e\u0432\u043e\u0439 \u043d\u043e\u0434\u044b.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0421\u043f\u0440\u043e\u0441\u0438\u0432 google, \u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043e\u0442\u0432\u0435\u0442 \u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445 \u043e\u0442 \u0445\u043e\u0441\u0442\u0438\u043d\u0433-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432. <br \/>  \u0410 \u0432\u0435\u0434\u044c \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0437\u043d\u0430\u044f, \u043e\u0442 CEO \u0434\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 adult web-\u043c\u0430\u0441\u0442\u0435\u0440\u043e\u0432.<br \/>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u0436\u0435 \u043e\u043f\u0440\u043e\u0441.        \t<\/p>\n<div class=\"polling\">\n<form action=\"\/json\/polling\/\" class=\"poll\" method=\"post\">\n<div class=\"poll_title\">\u041a\u0430\u043a \u0432\u044b \u0434\u0443\u043c\u0430\u0435\u0442\u0435, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0441\u043f\u0440\u043e\u0441\u043e\u043c?<\/div>\n<p>  \t\t<input type=\"hidden\" name=\"post_id\" value=\"269123\"\/> \t\t<input type=\"hidden\" name=\"polling_question_id\" value=\"14103\"\/>  \t\t<\/p>\n<table class=\"answer\">\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"checkbox\" id=\"vv69185\" \t\t\t\t\t\tclass=\"checkbox js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"69185\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv69185\">\u0414\u0430, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0439, \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0443\u0436\u0435\u043d.<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"checkbox\" id=\"vv69187\" \t\t\t\t\t\tclass=\"checkbox js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"69187\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv69187\">\u041d\u0435\u0442, \u043d\u0435 \u043d\u0430\u0434\u043e, cloudflare \u044d\u0442\u043e \u0432\u0441\u0435 \u0443\u043c\u0435\u0435\u0442.<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"checkbox\" id=\"vv69189\" \t\t\t\t\t\tclass=\"checkbox js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"69189\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv69189\">\u0421\u0432\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0445.<\/label> \t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<p class=\"total\">\u041d\u0438\u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b. \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f 1 \u0447\u0435\u043b\u043e\u0432\u0435\u043a.<\/p>\n<\/p><\/form>\n<p class=\"for_users_only_msg\">\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a href=\"https:\/\/habrahabr.ru\/auth\/login\/\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/p>\n<\/p><\/div>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/269123\/\"> https:\/\/habrahabr.ru\/post\/269123\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8b3\/095\/f82\/8b3095f8262c4f46bef08adbd6a5d9bc.png\"\/><br \/>  \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u043e\u0432, \u0441 \u043c\u043d\u043e\u0433\u0438\u0445 \u043d\u043e\u0434 (n&gt;20) \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e (n&lt;=3) \u0431\u043e\u0435\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0432 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043e\u0442 \u043a\u043e\u043b\u043b\u0435\u0433\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f, \u0438 \u0432\u0441\u0435 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u044e. <br \/>  \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445.<\/p>\n<p>  \u041a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0431\u044b\u043b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043d\u043e\u0434 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0447\u043d\u044f \u0434\u043e\u043c\u0435\u043d\u043e\u0432. <br \/>  \u041f\u0440\u043e\u0444\u0438\u0442 \u043e\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0438 DNS \u0441 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0435\u0439.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-275896","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/275896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=275896"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/275896\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=275896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=275896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=275896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}