{"action":"created","comment":{"url":"https://api.github.com/repos/tenex/rails-assets/pulls/comments/50257690","id":50257690,"diff_hunk":"@@ -0,0 +1,187 @@\n+---\n+- name: basic provisioning\n+  hosts: all\n+  user: root\n+  roles:\n+    - role: holms.fqdn\n+      fqdn: \"{{ inventory_hostname }}\"\n+      hostname: \"{{ inventory_hostname_short }}\"\n+\n+    - role: rvm_io.rvm1-ruby\n+      rvm1_rubies:\n+        - 'ruby-2.2.3'\n+\n+    - role: kamaln7.swapfile\n+      swapfile_use_dd: True\n+      swapfile_size: 2048\n+\n+  tasks:\n+    - name: update installed packages\n+      apt: upgrade=dist update_cache=yes\n+\n+    - name: install server base packages\n+      apt: name={{ item }} state=latest update_cache=yes\n+      with_items:\n+        - apt-file\n+        - build-essential\n+        - cowsay\n+        - curl\n+        - dnsutils\n+        - emacs24\n+        - fail2ban\n+        - gettext\n+        - git\n+        - htop\n+        - iotop\n+        - jq\n+        - libcurl4-openssl-dev\n+        - libgmp-dev\n+        - libpq-dev\n+        - moreutils\n+        - nodejs\n+        - nodejs\n+        - nodejs-legacy\n+        - npm\n+        - ntp\n+        - pcregrep\n+        - postgresql\n+        - postgresql-contrib\n+        - pv\n+        - python-pip\n+        - python-psycopg2\n+        - python-virtualenv\n+        - redis-server\n+        - redis-tools\n+        - rsync\n+        - silversearcher-ag\n+        - speedometer\n+        - texinfo\n+        - tig\n+        - tmux\n+        - wget\n+        - zsh\n+\n+    - name: install bower\n+      npm: name=bower global=yes\n+\n+- name: create users and configure authentication\n+  hosts: all\n+  user: root\n+  tasks:\n+    - name: setup app group\n+      group: name={{ app_name }} state=present\n+\n+    - name: setup app user\n+      user: name={{ app_name }} shell=/bin/bash\n+            groups=rvm,{{ app_name }} append=yes\n+\n+    - name: set tmp permissions\n+      file: path=/tmp mode=a+w\n+\n+    - name: enable agent forwarding\n+      lineinfile: dest=/etc/ssh/sshd_config\n+                  state=present\n+                  regexp='^AllowAgentForwarding'\n+                  line='AllowAgentForwarding yes'\n+      notify: restart sshd\n+\n+  handlers:\n+    - name: restart sshd\n+      service: name=ssh state=restarted\n+\n+- name: install passenger-nginx\n+  hosts: all\n+  user: root\n+  tasks:\n+    - apt_key: keyserver=keyserver.ubuntu.com id=561F9B9CAC40B2F7\n+    - apt: name={{ item }} state=latest\n+      with_items:\n+        - apt-transport-https\n+        - ca-certificates\n+    - apt_repository: state=present\n+        repo=\"deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main\"\n+    - apt: name={{ item }} state=latest  update_cache=yes\n+      with_items:\n+        - nginx-extras\n+        - passenger\n+\n+- name: configure passenger-nginx\n+  hosts: all\n+  user: root\n+  tasks:\n+    - shell: passenger-config --root\n+      register: passenger_root\n+    - lineinfile: dest=/etc/nginx/nginx.conf state=present\n+        regexp='^user'\n+        line=\"user {{ app_name }};\"\n+      notify: restart nginx\n+    - lineinfile: dest=/etc/nginx/nginx.conf state=present\n+        regexp='^\\s*passenger_root'\n+        insertafter='^http {'\n+        line=\"        passenger_root {{ passenger_root.stdout }};\"\n+      notify: restart nginx\n+    - lineinfile: dest=/etc/nginx/nginx.conf state=present\n+        regexp='^\\s*passenger_ruby'\n+        insertafter='^http {'\n+        line='        passenger_ruby /usr/local/bin/ruby;'\n+      notify: restart nginx\n+    - lineinfile: dest=/etc/nginx/nginx.conf state=present\n+        regexp='^\\s*worker_connections'\n+        insertafter='^event {'\n+        line='        worker_connections 1024;'\n+      notify: restart nginx\n+    - lineinfile: dest=/etc/nginx/nginx.conf state=present\n+        regexp='^\\s*client_max_body_size'\n+        insertafter='^http {'\n+        line='        client_max_body_size 50m;'\n+      notify: restart nginx\n+    - lineinfile: dest=/etc/nginx/nginx.conf state=present\n+        regexp='^\\s*passenger_max_pool_size'\n+        insertafter='^http {'\n+        line='        passenger_max_pool_size 12;'\n+      notify: restart nginx\n+    - template:\n+        src=nginx-site.conf.j2\n+        dest=\"/etc/nginx/sites-enabled/{{ app_name }}.conf\"\n+      notify: restart nginx\n+    - file: path=/etc/nginx/sites-enabled/default state=absent\n+      notify: restart nginx\n+  handlers:\n+    - name: restart nginx\n+      service: name=nginx state=restarted\n+\n+- name: configure serving directories\n+  hosts: all\n+  user: root\n+  tasks:\n+    - file: path=/home/{{ app_name }}/rails-apps/{{ app_name }}\n+            owner={{ app_name }}\n+            group={{ app_name }}\n+            mode=0770\n+            state=directory\n+\n+- name: configure database\n+  hosts: rails-assets\n+  become: true\n+  become_user: postgres\n+  tags:\n+    - db\n+  tasks:","path":"infrastructure/provision-rails-assets.yml","position":169,"original_position":169,"commit_id":"efeddf48187c325d305c8a0cf364a71012dbfc4a","original_commit_id":"efeddf48187c325d305c8a0cf364a71012dbfc4a","user":{"login":"joshjordan","id":521674,"avatar_url":"https://avatars.githubusercontent.com/u/521674?v=3","gravatar_id":"","url":"https://api.github.com/users/joshjordan","html_url":"https://github.com/joshjordan","followers_url":"https://api.github.com/users/joshjordan/followers","following_url":"https://api.github.com/users/joshjordan/following{/other_user}","gists_url":"https://api.github.com/users/joshjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/joshjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshjordan/subscriptions","organizations_url":"https://api.github.com/users/joshjordan/orgs","repos_url":"https://api.github.com/users/joshjordan/repos","events_url":"https://api.github.com/users/joshjordan/events{/privacy}","received_events_url":"https://api.github.com/users/joshjordan/received_events","type":"User","site_admin":false},"body":"Seems to be missing setting the user password.","created_at":"2016-01-20T14:12:32Z","updated_at":"2016-01-20T14:12:32Z","html_url":"https://github.com/tenex/rails-assets/pull/2#discussion_r50257690","pull_request_url":"https://api.github.com/repos/tenex/rails-assets/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/tenex/rails-assets/pulls/comments/50257690"},"html":{"href":"https://github.com/tenex/rails-assets/pull/2#discussion_r50257690"},"pull_request":{"href":"https://api.github.com/repos/tenex/rails-assets/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/tenex/rails-assets/pulls/2","id":56591197,"html_url":"https://github.com/tenex/rails-assets/pull/2","diff_url":"https://github.com/tenex/rails-assets/pull/2.diff","patch_url":"https://github.com/tenex/rails-assets/pull/2.patch","issue_url":"https://api.github.com/repos/tenex/rails-assets/issues/2","number":2,"state":"open","locked":false,"title":"Lb/ansible","user":{"login":"hut8","id":363720,"avatar_url":"https://avatars.githubusercontent.com/u/363720?v=3","gravatar_id":"","url":"https://api.github.com/users/hut8","html_url":"https://github.com/hut8","followers_url":"https://api.github.com/users/hut8/followers","following_url":"https://api.github.com/users/hut8/following{/other_user}","gists_url":"https://api.github.com/users/hut8/gists{/gist_id}","starred_url":"https://api.github.com/users/hut8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hut8/subscriptions","organizations_url":"https://api.github.com/users/hut8/orgs","repos_url":"https://api.github.com/users/hut8/repos","events_url":"https://api.github.com/users/hut8/events{/privacy}","received_events_url":"https://api.github.com/users/hut8/received_events","type":"User","site_admin":false},"body":"Stuff that's missing:\r\n\r\n* Task for initially getting / subsequently renewing the Let's Encrypt cert (this is actually a huge chore)","created_at":"2016-01-20T10:47:13Z","updated_at":"2016-01-20T14:12:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b308dd46c379f3645cc9ce5d9d0bb5613c0caf3","assignee":{"login":"joshjordan","id":521674,"avatar_url":"https://avatars.githubusercontent.com/u/521674?v=3","gravatar_id":"","url":"https://api.github.com/users/joshjordan","html_url":"https://github.com/joshjordan","followers_url":"https://api.github.com/users/joshjordan/followers","following_url":"https://api.github.com/users/joshjordan/following{/other_user}","gists_url":"https://api.github.com/users/joshjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/joshjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshjordan/subscriptions","organizations_url":"https://api.github.com/users/joshjordan/orgs","repos_url":"https://api.github.com/users/joshjordan/repos","events_url":"https://api.github.com/users/joshjordan/events{/privacy}","received_events_url":"https://api.github.com/users/joshjordan/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/tenex/rails-assets/pulls/2/commits","review_comments_url":"https://api.github.com/repos/tenex/rails-assets/pulls/2/comments","review_comment_url":"https://api.github.com/repos/tenex/rails-assets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tenex/rails-assets/issues/2/comments","statuses_url":"https://api.github.com/repos/tenex/rails-assets/statuses/efeddf48187c325d305c8a0cf364a71012dbfc4a","head":{"label":"tenex:lb/ansible","ref":"lb/ansible","sha":"efeddf48187c325d305c8a0cf364a71012dbfc4a","user":{"login":"tenex","id":16297471,"avatar_url":"https://avatars.githubusercontent.com/u/16297471?v=3","gravatar_id":"","url":"https://api.github.com/users/tenex","html_url":"https://github.com/tenex","followers_url":"https://api.github.com/users/tenex/followers","following_url":"https://api.github.com/users/tenex/following{/other_user}","gists_url":"https://api.github.com/users/tenex/gists{/gist_id}","starred_url":"https://api.github.com/users/tenex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenex/subscriptions","organizations_url":"https://api.github.com/users/tenex/orgs","repos_url":"https://api.github.com/users/tenex/repos","events_url":"https://api.github.com/users/tenex/events{/privacy}","received_events_url":"https://api.github.com/users/tenex/received_events","type":"Organization","site_admin":false},"repo":{"id":49998885,"name":"rails-assets","full_name":"tenex/rails-assets","owner":{"login":"tenex","id":16297471,"avatar_url":"https://avatars.githubusercontent.com/u/16297471?v=3","gravatar_id":"","url":"https://api.github.com/users/tenex","html_url":"https://github.com/tenex","followers_url":"https://api.github.com/users/tenex/followers","following_url":"https://api.github.com/users/tenex/following{/other_user}","gists_url":"https://api.github.com/users/tenex/gists{/gist_id}","starred_url":"https://api.github.com/users/tenex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenex/subscriptions","organizations_url":"https://api.github.com/users/tenex/orgs","repos_url":"https://api.github.com/users/tenex/repos","events_url":"https://api.github.com/users/tenex/events{/privacy}","received_events_url":"https://api.github.com/users/tenex/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tenex/rails-assets","description":"The solution to assets management in Rails","fork":true,"url":"https://api.github.com/repos/tenex/rails-assets","forks_url":"https://api.github.com/repos/tenex/rails-assets/forks","keys_url":"https://api.github.com/repos/tenex/rails-assets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tenex/rails-assets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tenex/rails-assets/teams","hooks_url":"https://api.github.com/repos/tenex/rails-assets/hooks","issue_events_url":"https://api.github.com/repos/tenex/rails-assets/issues/events{/number}","events_url":"https://api.github.com/repos/tenex/rails-assets/events","assignees_url":"https://api.github.com/repos/tenex/rails-assets/assignees{/user}","branches_url":"https://api.github.com/repos/tenex/rails-assets/branches{/branch}","tags_url":"https://api.github.com/repos/tenex/rails-assets/tags","blobs_url":"https://api.github.com/repos/tenex/rails-assets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tenex/rails-assets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tenex/rails-assets/git/refs{/sha}","trees_url":"https://api.github.com/repos/tenex/rails-assets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tenex/rails-assets/statuses/{sha}","languages_url":"https://api.github.com/repos/tenex/rails-assets/languages","stargazers_url":"https://api.github.com/repos/tenex/rails-assets/stargazers","contributors_url":"https://api.github.com/repos/tenex/rails-assets/contributors","subscribers_url":"https://api.github.com/repos/tenex/rails-assets/subscribers","subscription_url":"https://api.github.com/repos/tenex/rails-assets/subscription","commits_url":"https://api.github.com/repos/tenex/rails-assets/commits{/sha}","git_commits_url":"https://api.github.com/repos/tenex/rails-assets/git/commits{/sha}","comments_url":"https://api.github.com/repos/tenex/rails-assets/comments{/number}","issue_comment_url":"https://api.github.com/repos/tenex/rails-assets/issues/comments{/number}","contents_url":"https://api.github.com/repos/tenex/rails-assets/contents/{+path}","compare_url":"https://api.github.com/repos/tenex/rails-assets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tenex/rails-assets/merges","archive_url":"https://api.github.com/repos/tenex/rails-assets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tenex/rails-assets/downloads","issues_url":"https://api.github.com/repos/tenex/rails-assets/issues{/number}","pulls_url":"https://api.github.com/repos/tenex/rails-assets/pulls{/number}","milestones_url":"https://api.github.com/repos/tenex/rails-assets/milestones{/number}","notifications_url":"https://api.github.com/repos/tenex/rails-assets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tenex/rails-assets/labels{/name}","releases_url":"https://api.github.com/repos/tenex/rails-assets/releases{/id}","created_at":"2016-01-20T02:37:05Z","updated_at":"2016-01-20T11:23:30Z","pushed_at":"2016-01-20T11:24:46Z","git_url":"git://github.com/tenex/rails-assets.git","ssh_url":"git@github.com:tenex/rails-assets.git","clone_url":"https://github.com/tenex/rails-assets.git","svn_url":"https://github.com/tenex/rails-assets","homepage":"https://rails-assets.org","size":1509,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"tenex:master","ref":"master","sha":"1c6fe89c3c561965157f4264cef44dd97ba540dd","user":{"login":"tenex","id":16297471,"avatar_url":"https://avatars.githubusercontent.com/u/16297471?v=3","gravatar_id":"","url":"https://api.github.com/users/tenex","html_url":"https://github.com/tenex","followers_url":"https://api.github.com/users/tenex/followers","following_url":"https://api.github.com/users/tenex/following{/other_user}","gists_url":"https://api.github.com/users/tenex/gists{/gist_id}","starred_url":"https://api.github.com/users/tenex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenex/subscriptions","organizations_url":"https://api.github.com/users/tenex/orgs","repos_url":"https://api.github.com/users/tenex/repos","events_url":"https://api.github.com/users/tenex/events{/privacy}","received_events_url":"https://api.github.com/users/tenex/received_events","type":"Organization","site_admin":false},"repo":{"id":49998885,"name":"rails-assets","full_name":"tenex/rails-assets","owner":{"login":"tenex","id":16297471,"avatar_url":"https://avatars.githubusercontent.com/u/16297471?v=3","gravatar_id":"","url":"https://api.github.com/users/tenex","html_url":"https://github.com/tenex","followers_url":"https://api.github.com/users/tenex/followers","following_url":"https://api.github.com/users/tenex/following{/other_user}","gists_url":"https://api.github.com/users/tenex/gists{/gist_id}","starred_url":"https://api.github.com/users/tenex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenex/subscriptions","organizations_url":"https://api.github.com/users/tenex/orgs","repos_url":"https://api.github.com/users/tenex/repos","events_url":"https://api.github.com/users/tenex/events{/privacy}","received_events_url":"https://api.github.com/users/tenex/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tenex/rails-assets","description":"The solution to assets management in Rails","fork":true,"url":"https://api.github.com/repos/tenex/rails-assets","forks_url":"https://api.github.com/repos/tenex/rails-assets/forks","keys_url":"https://api.github.com/repos/tenex/rails-assets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tenex/rails-assets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tenex/rails-assets/teams","hooks_url":"https://api.github.com/repos/tenex/rails-assets/hooks","issue_events_url":"https://api.github.com/repos/tenex/rails-assets/issues/events{/number}","events_url":"https://api.github.com/repos/tenex/rails-assets/events","assignees_url":"https://api.github.com/repos/tenex/rails-assets/assignees{/user}","branches_url":"https://api.github.com/repos/tenex/rails-assets/branches{/branch}","tags_url":"https://api.github.com/repos/tenex/rails-assets/tags","blobs_url":"https://api.github.com/repos/tenex/rails-assets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tenex/rails-assets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tenex/rails-assets/git/refs{/sha}","trees_url":"https://api.github.com/repos/tenex/rails-assets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tenex/rails-assets/statuses/{sha}","languages_url":"https://api.github.com/repos/tenex/rails-assets/languages","stargazers_url":"https://api.github.com/repos/tenex/rails-assets/stargazers","contributors_url":"https://api.github.com/repos/tenex/rails-assets/contributors","subscribers_url":"https://api.github.com/repos/tenex/rails-assets/subscribers","subscription_url":"https://api.github.com/repos/tenex/rails-assets/subscription","commits_url":"https://api.github.com/repos/tenex/rails-assets/commits{/sha}","git_commits_url":"https://api.github.com/repos/tenex/rails-assets/git/commits{/sha}","comments_url":"https://api.github.com/repos/tenex/rails-assets/comments{/number}","issue_comment_url":"https://api.github.com/repos/tenex/rails-assets/issues/comments{/number}","contents_url":"https://api.github.com/repos/tenex/rails-assets/contents/{+path}","compare_url":"https://api.github.com/repos/tenex/rails-assets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tenex/rails-assets/merges","archive_url":"https://api.github.com/repos/tenex/rails-assets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tenex/rails-assets/downloads","issues_url":"https://api.github.com/repos/tenex/rails-assets/issues{/number}","pulls_url":"https://api.github.com/repos/tenex/rails-assets/pulls{/number}","milestones_url":"https://api.github.com/repos/tenex/rails-assets/milestones{/number}","notifications_url":"https://api.github.com/repos/tenex/rails-assets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tenex/rails-assets/labels{/name}","releases_url":"https://api.github.com/repos/tenex/rails-assets/releases{/id}","created_at":"2016-01-20T02:37:05Z","updated_at":"2016-01-20T11:23:30Z","pushed_at":"2016-01-20T11:24:46Z","git_url":"git://github.com/tenex/rails-assets.git","ssh_url":"git@github.com:tenex/rails-assets.git","clone_url":"https://github.com/tenex/rails-assets.git","svn_url":"https://github.com/tenex/rails-assets","homepage":"https://rails-assets.org","size":1509,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tenex/rails-assets/pulls/2"},"html":{"href":"https://github.com/tenex/rails-assets/pull/2"},"issue":{"href":"https://api.github.com/repos/tenex/rails-assets/issues/2"},"comments":{"href":"https://api.github.com/repos/tenex/rails-assets/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/tenex/rails-assets/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/tenex/rails-assets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tenex/rails-assets/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/tenex/rails-assets/statuses/efeddf48187c325d305c8a0cf364a71012dbfc4a"}}}}