diff --git a/ansible/tasks/postgres-extensions/19-pg_graphql.yml b/ansible/tasks/postgres-extensions/19-pg_graphql.yml new file mode 100644 index 000000000..0998ff924 --- /dev/null +++ b/ansible/tasks/postgres-extensions/19-pg_graphql.yml @@ -0,0 +1,50 @@ +# pg_graphql +- name: pg_graphql - download & install dependencies + apt: + pkg: + - bison + - build-essential + - clang-11 + - cmake + - flex + - python2 + update_cache: yes + install_recommends: no + +- name: pg_graphql - download libgraphqlparser + git: + repo: https://github.com/graphql/libgraphqlparser.git + dest: /tmp/libgraphqlparser + version: "{{ libgraphqlparser_release }}" + become: yes + +- name: pg_graphql - compile libgraphqlparser + shell: + cmd: "cmake ." + chdir: /tmp/libgraphqlparser + become: yes + +- name: pg_graphql - build libgraphqlparser + make: + chdir: /tmp/libgraphqlparser + target: install + become: yes + +- name: pg_graphql - download latest release + git: + repo: https://github.com/supabase/pg_graphql.git + dest: /tmp/pg_graphql + version: "{{ pg_graphql_release }}" + become: yes + +- name: pg_graphql - build + make: + chdir: /tmp/pg_graphql + target: install + become: yes + +- name: pg_graphql - update links and cache for shared libraries + shell: + cmd: "/sbin/ldconfig -v" + chdir: /tmp/pg_graphql + become: yes diff --git a/ansible/tasks/setup-extensions.yml b/ansible/tasks/setup-extensions.yml index 2c0c89a6e..1813a21f8 100644 --- a/ansible/tasks/setup-extensions.yml +++ b/ansible/tasks/setup-extensions.yml @@ -51,3 +51,6 @@ - name: Install pgsodium import_tasks: tasks/postgres-extensions/18-pgsodium.yml + +- name: Install pg_graphql + import_tasks: tasks/postgres-extensions/19-pg_graphql.yml \ No newline at end of file diff --git a/ansible/vars.yml b/ansible/vars.yml index 47adb817d..60cf0f85d 100644 --- a/ansible/vars.yml +++ b/ansible/vars.yml @@ -94,5 +94,9 @@ libsodium_release_checksum: sha1:795b73e3f92a362fabee238a71735579bf46bb97 pgsodium_release: "2.0.1" pgsodium_release_checksum: sha1:b6ef733c9bbae590c1eee676fd0a97fd129893e0 +libgraphqlparser_release: "v0.7.0" + +pg_graphql_release: "v0.1.2" + osquery_deb: 'https://pkg.osquery.io/deb/osquery_5.1.0-1.linux_arm64.deb' osquery_deb_checksum: sha1:6b6fa49edcfad5d77aa1e59c75b8708de2f634ac