{"action":"created","comment":{"url":"https://api.github.com/repos/okfn/infra/pulls/comments/24652191","id":24652191,"diff_hunk":"@@ -1,38 +1,175 @@\n-- name: check if our postgres container is there\n-  shell: docker ps | tail -n +2 | awk '{ print $NF }' | sed 's/,/\\n/g' | grep '^rt_pg$'\n-  register: rt_pg\n-  ignore_errors: True\n-\n-- name: docker postgres volumes\n-  command: mkdir -p /data/rt_pg\n-  when: rt_pg.rc == 1\n-\n-- name: docker postgres server\n-  command: docker run -d -e=\"POSTGRES_DBA_PW={{postgres_dba_pw}}\" -v=\"/data/rt_pg:/data\" -p=5432 -name=rt_pg okfn/postgres:0.4\n-  when: rt_pg.rc == 1\n-\n-#  - name: address of postgresql server\n-#    set_fact: db_host={{docker_containers[0].NetworkSettings.IPAddress}}\n-#\n-#  - name: show db_host\n-#    debug: msg=\"{{db_host}}\"\n-\n-- name: check if our rt container is there\n-  shell: docker ps | tail -n +2 | awk '{ print $NF }' | sed 's/,/\\n/g' | grep '^rt$'\n-  register: rt\n-  ignore_errors: True\n-\n-- name: docker rt volumes\n-  command: mkdir -p /data/{{ docker_container }}\n-  when: rt.rc == 1\n-\n-- name: create docker rt server\n-  command: docker run -d -e=\"RT_DATABASE_PW={{rt_database_pw}}\" -v=\"/data/rt:/data\" -p=127.0.0.1:5025:25 -p=127.0.0.1:5080:80 -link=rt_pg:db -name={{ docker_container }} okfn/rt:0.16\n-  when: rt.rc == 1\n-\n-- name: configure docker rt server\n-  copy: src=RT_SiteConfig.pm dest=/data/rt/rt_conf/ owner=root group=www-data mode=0640\n-  notify: restart rt\n+\n+- name: Install RT pre-reqs through apt-get\n+  apt: pkg={{ item }} state=installed update_cache=yes\n+  with_items:\n+  - build-essential \n+  - postgresql-client \n+  - mailutils \n+  - openssl \n+  - libyaml-perl \n+  - libyaml-appconfig-perl \n+  - libssl-dev \n+  - libexpat1-dev\n+  - libdbd-mysql-perl\n+  - libnet-smtp-ssl-perl \n+  - libdatetime-event-ical-perl\n+  - libdbd-pg-perl\n+  - procmail\n+  - spawn-fcgi\n+\n+- name: check if RT is installed\n+  stat: path=/opt/rt4/.installed\n+  register: rt_exists\n+\n+- name: get latest RT release\n+  get_url: url=https://download.bestpractical.com/pub/rt/release/rt-{{ rt_version }}.tar.gz dest=/opt/\n+  when: rt_exists.stat.exists == false\n+\n+- name: extract RT \n+  unarchive: src=/opt/rt-{{ rt_version }}.tar.gz dest=/opt/ copy=no\n+  when: rt_exists.stat.exists == false\n+\n+- name: copy rt dir to rt4 dir\n+  command: mv /opt/rt-{{ rt_version }} /opt/rt4-install\n+  register: rtdirectory\n+  when: rt_exists.stat.exists == false\n+\n+- name: configure RT install\n+  {command: ./configure","path":"ansible/roles/rt/tasks/main.yml","position":73,"original_position":73,"commit_id":"88a63d1583ec362928262db4cb16dd2a484a5703","original_commit_id":"88a63d1583ec362928262db4cb16dd2a484a5703","user":{"login":"nigelbabu","id":373438,"avatar_url":"https://avatars.githubusercontent.com/u/373438?v=3","gravatar_id":"","url":"https://api.github.com/users/nigelbabu","html_url":"https://github.com/nigelbabu","followers_url":"https://api.github.com/users/nigelbabu/followers","following_url":"https://api.github.com/users/nigelbabu/following{/other_user}","gists_url":"https://api.github.com/users/nigelbabu/gists{/gist_id}","starred_url":"https://api.github.com/users/nigelbabu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nigelbabu/subscriptions","organizations_url":"https://api.github.com/users/nigelbabu/orgs","repos_url":"https://api.github.com/users/nigelbabu/repos","events_url":"https://api.github.com/users/nigelbabu/events{/privacy}","received_events_url":"https://api.github.com/users/nigelbabu/received_events","type":"User","site_admin":false},"body":"Is that `{` supposed to be there or a typo?","created_at":"2015-02-13T09:20:29Z","updated_at":"2015-02-13T09:20:29Z","html_url":"https://github.com/okfn/infra/pull/44#discussion_r24652191","pull_request_url":"https://api.github.com/repos/okfn/infra/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/okfn/infra/pulls/comments/24652191"},"html":{"href":"https://github.com/okfn/infra/pull/44#discussion_r24652191"},"pull_request":{"href":"https://api.github.com/repos/okfn/infra/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/okfn/infra/pulls/44","id":26654464,"html_url":"https://github.com/okfn/infra/pull/44","diff_url":"https://github.com/okfn/infra/pull/44.diff","patch_url":"https://github.com/okfn/infra/pull/44.patch","issue_url":"https://api.github.com/repos/okfn/infra/issues/44","number":44,"state":"open","locked":false,"title":"Rt - role to install RT and a number of extensions","user":{"login":"mattrm","id":4024801,"avatar_url":"https://avatars.githubusercontent.com/u/4024801?v=3","gravatar_id":"","url":"https://api.github.com/users/mattrm","html_url":"https://github.com/mattrm","followers_url":"https://api.github.com/users/mattrm/followers","following_url":"https://api.github.com/users/mattrm/following{/other_user}","gists_url":"https://api.github.com/users/mattrm/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrm/subscriptions","organizations_url":"https://api.github.com/users/mattrm/orgs","repos_url":"https://api.github.com/users/mattrm/repos","events_url":"https://api.github.com/users/mattrm/events{/privacy}","received_events_url":"https://api.github.com/users/mattrm/received_events","type":"User","site_admin":false},"body":"Nigel - can you test this ansible play on a new RT server for me?  It's potentially going to need some more work, but I'd like you to test this out first please.","created_at":"2014-12-29T18:06:07Z","updated_at":"2015-02-13T09:20:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"215965702925c51b4eac40d16c0f44488fd80da3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/okfn/infra/pulls/44/commits","review_comments_url":"https://api.github.com/repos/okfn/infra/pulls/44/comments","review_comment_url":"https://api.github.com/repos/okfn/infra/pulls/comments/{number}","comments_url":"https://api.github.com/repos/okfn/infra/issues/44/comments","statuses_url":"https://api.github.com/repos/okfn/infra/statuses/88a63d1583ec362928262db4cb16dd2a484a5703","head":{"label":"okfn:rt","ref":"rt","sha":"88a63d1583ec362928262db4cb16dd2a484a5703","user":{"login":"okfn","id":304263,"avatar_url":"https://avatars.githubusercontent.com/u/304263?v=3","gravatar_id":"","url":"https://api.github.com/users/okfn","html_url":"https://github.com/okfn","followers_url":"https://api.github.com/users/okfn/followers","following_url":"https://api.github.com/users/okfn/following{/other_user}","gists_url":"https://api.github.com/users/okfn/gists{/gist_id}","starred_url":"https://api.github.com/users/okfn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okfn/subscriptions","organizations_url":"https://api.github.com/users/okfn/orgs","repos_url":"https://api.github.com/users/okfn/repos","events_url":"https://api.github.com/users/okfn/events{/privacy}","received_events_url":"https://api.github.com/users/okfn/received_events","type":"Organization","site_admin":false},"repo":{"id":14806276,"name":"infra","full_name":"okfn/infra","owner":{"login":"okfn","id":304263,"avatar_url":"https://avatars.githubusercontent.com/u/304263?v=3","gravatar_id":"","url":"https://api.github.com/users/okfn","html_url":"https://github.com/okfn","followers_url":"https://api.github.com/users/okfn/followers","following_url":"https://api.github.com/users/okfn/following{/other_user}","gists_url":"https://api.github.com/users/okfn/gists{/gist_id}","starred_url":"https://api.github.com/users/okfn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okfn/subscriptions","organizations_url":"https://api.github.com/users/okfn/orgs","repos_url":"https://api.github.com/users/okfn/repos","events_url":"https://api.github.com/users/okfn/events{/privacy}","received_events_url":"https://api.github.com/users/okfn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/okfn/infra","description":"Repository for OKF infrastructure and systems administration tools","fork":false,"url":"https://api.github.com/repos/okfn/infra","forks_url":"https://api.github.com/repos/okfn/infra/forks","keys_url":"https://api.github.com/repos/okfn/infra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/okfn/infra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/okfn/infra/teams","hooks_url":"https://api.github.com/repos/okfn/infra/hooks","issue_events_url":"https://api.github.com/repos/okfn/infra/issues/events{/number}","events_url":"https://api.github.com/repos/okfn/infra/events","assignees_url":"https://api.github.com/repos/okfn/infra/assignees{/user}","branches_url":"https://api.github.com/repos/okfn/infra/branches{/branch}","tags_url":"https://api.github.com/repos/okfn/infra/tags","blobs_url":"https://api.github.com/repos/okfn/infra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/okfn/infra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/okfn/infra/git/refs{/sha}","trees_url":"https://api.github.com/repos/okfn/infra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/okfn/infra/statuses/{sha}","languages_url":"https://api.github.com/repos/okfn/infra/languages","stargazers_url":"https://api.github.com/repos/okfn/infra/stargazers","contributors_url":"https://api.github.com/repos/okfn/infra/contributors","subscribers_url":"https://api.github.com/repos/okfn/infra/subscribers","subscription_url":"https://api.github.com/repos/okfn/infra/subscription","commits_url":"https://api.github.com/repos/okfn/infra/commits{/sha}","git_commits_url":"https://api.github.com/repos/okfn/infra/git/commits{/sha}","comments_url":"https://api.github.com/repos/okfn/infra/comments{/number}","issue_comment_url":"https://api.github.com/repos/okfn/infra/issues/comments/{number}","contents_url":"https://api.github.com/repos/okfn/infra/contents/{+path}","compare_url":"https://api.github.com/repos/okfn/infra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/okfn/infra/merges","archive_url":"https://api.github.com/repos/okfn/infra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/okfn/infra/downloads","issues_url":"https://api.github.com/repos/okfn/infra/issues{/number}","pulls_url":"https://api.github.com/repos/okfn/infra/pulls{/number}","milestones_url":"https://api.github.com/repos/okfn/infra/milestones{/number}","notifications_url":"https://api.github.com/repos/okfn/infra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/okfn/infra/labels{/name}","releases_url":"https://api.github.com/repos/okfn/infra/releases{/id}","created_at":"2013-11-29T16:47:49Z","updated_at":"2015-02-12T09:54:27Z","pushed_at":"2015-02-12T10:22:08Z","git_url":"git://github.com/okfn/infra.git","ssh_url":"git@github.com:okfn/infra.git","clone_url":"https://github.com/okfn/infra.git","svn_url":"https://github.com/okfn/infra","homepage":null,"size":6551,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":7,"forks":16,"open_issues":7,"watchers":25,"default_branch":"master"}},"base":{"label":"okfn:master","ref":"master","sha":"4f251d234f4fdb05a652930eabb0ca9b21814e3a","user":{"login":"okfn","id":304263,"avatar_url":"https://avatars.githubusercontent.com/u/304263?v=3","gravatar_id":"","url":"https://api.github.com/users/okfn","html_url":"https://github.com/okfn","followers_url":"https://api.github.com/users/okfn/followers","following_url":"https://api.github.com/users/okfn/following{/other_user}","gists_url":"https://api.github.com/users/okfn/gists{/gist_id}","starred_url":"https://api.github.com/users/okfn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okfn/subscriptions","organizations_url":"https://api.github.com/users/okfn/orgs","repos_url":"https://api.github.com/users/okfn/repos","events_url":"https://api.github.com/users/okfn/events{/privacy}","received_events_url":"https://api.github.com/users/okfn/received_events","type":"Organization","site_admin":false},"repo":{"id":14806276,"name":"infra","full_name":"okfn/infra","owner":{"login":"okfn","id":304263,"avatar_url":"https://avatars.githubusercontent.com/u/304263?v=3","gravatar_id":"","url":"https://api.github.com/users/okfn","html_url":"https://github.com/okfn","followers_url":"https://api.github.com/users/okfn/followers","following_url":"https://api.github.com/users/okfn/following{/other_user}","gists_url":"https://api.github.com/users/okfn/gists{/gist_id}","starred_url":"https://api.github.com/users/okfn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okfn/subscriptions","organizations_url":"https://api.github.com/users/okfn/orgs","repos_url":"https://api.github.com/users/okfn/repos","events_url":"https://api.github.com/users/okfn/events{/privacy}","received_events_url":"https://api.github.com/users/okfn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/okfn/infra","description":"Repository for OKF infrastructure and systems administration tools","fork":false,"url":"https://api.github.com/repos/okfn/infra","forks_url":"https://api.github.com/repos/okfn/infra/forks","keys_url":"https://api.github.com/repos/okfn/infra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/okfn/infra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/okfn/infra/teams","hooks_url":"https://api.github.com/repos/okfn/infra/hooks","issue_events_url":"https://api.github.com/repos/okfn/infra/issues/events{/number}","events_url":"https://api.github.com/repos/okfn/infra/events","assignees_url":"https://api.github.com/repos/okfn/infra/assignees{/user}","branches_url":"https://api.github.com/repos/okfn/infra/branches{/branch}","tags_url":"https://api.github.com/repos/okfn/infra/tags","blobs_url":"https://api.github.com/repos/okfn/infra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/okfn/infra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/okfn/infra/git/refs{/sha}","trees_url":"https://api.github.com/repos/okfn/infra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/okfn/infra/statuses/{sha}","languages_url":"https://api.github.com/repos/okfn/infra/languages","stargazers_url":"https://api.github.com/repos/okfn/infra/stargazers","contributors_url":"https://api.github.com/repos/okfn/infra/contributors","subscribers_url":"https://api.github.com/repos/okfn/infra/subscribers","subscription_url":"https://api.github.com/repos/okfn/infra/subscription","commits_url":"https://api.github.com/repos/okfn/infra/commits{/sha}","git_commits_url":"https://api.github.com/repos/okfn/infra/git/commits{/sha}","comments_url":"https://api.github.com/repos/okfn/infra/comments{/number}","issue_comment_url":"https://api.github.com/repos/okfn/infra/issues/comments/{number}","contents_url":"https://api.github.com/repos/okfn/infra/contents/{+path}","compare_url":"https://api.github.com/repos/okfn/infra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/okfn/infra/merges","archive_url":"https://api.github.com/repos/okfn/infra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/okfn/infra/downloads","issues_url":"https://api.github.com/repos/okfn/infra/issues{/number}","pulls_url":"https://api.github.com/repos/okfn/infra/pulls{/number}","milestones_url":"https://api.github.com/repos/okfn/infra/milestones{/number}","notifications_url":"https://api.github.com/repos/okfn/infra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/okfn/infra/labels{/name}","releases_url":"https://api.github.com/repos/okfn/infra/releases{/id}","created_at":"2013-11-29T16:47:49Z","updated_at":"2015-02-12T09:54:27Z","pushed_at":"2015-02-12T10:22:08Z","git_url":"git://github.com/okfn/infra.git","ssh_url":"git@github.com:okfn/infra.git","clone_url":"https://github.com/okfn/infra.git","svn_url":"https://github.com/okfn/infra","homepage":null,"size":6551,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":7,"forks":16,"open_issues":7,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/okfn/infra/pulls/44"},"html":{"href":"https://github.com/okfn/infra/pull/44"},"issue":{"href":"https://api.github.com/repos/okfn/infra/issues/44"},"comments":{"href":"https://api.github.com/repos/okfn/infra/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/okfn/infra/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/okfn/infra/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/okfn/infra/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/okfn/infra/statuses/88a63d1583ec362928262db4cb16dd2a484a5703"}}}}