- name: Setup eg.conf
become: true
copy:
+ remote_src: true
src: "{{repo_base}}/Evergreen/Open-ILS/examples/apache_24/eg_24.conf"
dest: /etc/apache2/sites-available/eg.conf
- name: Setup eg_vhost.conf
become: true
copy:
+ remote_src: true
src: "{{repo_base}}/Evergreen/Open-ILS/examples/apache_24/eg_vhost_24.conf"
dest: /etc/apache2/eg_vhost.conf
- name: Setup eg_startup
become: true
copy:
+ remote_src: true
src: "{{repo_base}}/Evergreen/Open-ILS/examples/apache/eg_startup"
dest: /etc/apache2/
- name: Create SSL Certs directory
- name: Enable apache mod headers
become: true
shell: /usr/sbin/a2enmod headers
- become: true
- name: Enable apache mod expires
- shell: /usr/sbin/a2enmod expires
become: true
+ shell: /usr/sbin/a2enmod expires
- name: Enable apache mod rewrite
- shell: /usr/sbin/a2enmod rewrite
become: true
+ shell: /usr/sbin/a2enmod rewrite
- name: Disable default site for apache
- shell: /usr/sbin/a2dissite 000-default
become: true
+ shell: /usr/sbin/a2dissite 000-default
- name: Enable eg.conf site for apache
- shell: /usr/sbin/a2ensite eg.conf
become: true
+ shell: /usr/sbin/a2ensite eg.conf
- name: Change ownership of /var/lock/apache2 to opensrf
- file: path=/var/lock/apache2 owner=opensrf group=opensrf
become: true
+ file: path=/var/lock/apache2 owner=opensrf group=opensrf
- name: Change run-user for apache to opensrf
become: true
replace:
password: "{{database_password}}"
role_attr_flags: SUPERUSER
- name: Apply EG DB Schema
+ # eg_db_config modifies {{eg_install_path}}/conf/ files in
+ # addition to building the schema
+ become: true
+ become_user: opensrf
shell: >
perl {{repo_base}}/Evergreen/Open-ILS/src/support-scripts/eg_db_config
{{load_sample_data}}
become: true
file: dest={{repo_base}} owner={{deploy_user}} group={{deploy_user}} recurse=yes
- name: Build Evergreen
- become: true
- become_user: opensrf
environment:
PATH: "{{ansible_env.PATH}}:{{eg_install_path}}/bin"
shell: >
&& autoreconf -i
&& ./configure --prefix={{eg_install_path}} --sysconfdir={{eg_install_path}}/conf
&& make
-- name: Set ownership of {{eg_install_path}} to opensrf
- become: true
- file: dest={{eg_install_path}} owner=opensrf group=opensrf recurse=yes
&& make STAFF_CLIENT_STAMP_ID={{eg_stamp_id}} install
- name: Create XUL Current Symlink
become: true
- become_user: opensrf
file:
state: link
src: "{{eg_install_path}}/var/web/xul/{{eg_stamp_id}}"
dest: "{{eg_install_path}}/var/web/xul/current"
- name: Create XUL Server Symlink
become: true
- become_user: opensrf
file:
state: link
src: "{{eg_install_path}}/var/web/xul/current/server"
dest: "{{eg_install_path}}/var/web/xul/server"
- name: Setup opensrf.xml config file
become: true
- become_user: opensrf
copy:
+ remote_src: true
src: "{{eg_install_path}}/conf/opensrf.xml.example"
dest: "{{eg_install_path}}/conf/opensrf.xml"
force: no
- name: Setup opensrf_core.xml config file
become: true
- become_user: opensrf
copy:
+ remote_src: true
src: "{{eg_install_path}}/conf/opensrf_core.xml.example"
dest: "{{eg_install_path}}/conf/opensrf_core.xml"
force: no
dest: /tmp/
- name: Copy dojo source files into place
become: true
- become_user: opensrf
- synchronize: src=/tmp/dojo-release-{{dojo_version}}/ dest={{eg_install_path}}/var/web/js/dojo/
+ # 'synchronize' is much faster than 'copy' for large directories
+ # delegate_to tells synchronize source files live on the remote machine.
+ delegate_to: "{{inventory_hostname}}"
+ synchronize:
+ src: /tmp/dojo-release-{{dojo_version}}/
+ dest: "{{eg_install_path}}/var/web/js/dojo/"
- name: Set ownership of {{eg_install_path}} to opensrf
become: true
file: dest={{eg_install_path}} owner=opensrf group=opensrf recurse=yes
- name: Setup .srfsh.xml for opensrf user
become: true
become_user: opensrf
- copy: src={{eg_install_path}}/conf/srfsh.xml.example dest=/home/opensrf/.srfsh.xml force=no
+ copy:
+ remote_src: true
+ src: "{{eg_install_path}}/conf/srfsh.xml.example"
+ dest: /home/opensrf/.srfsh.xml
+ force: no
- name: Copy ldconfig
become: true
copy:
npm: name=grunt-cli global=true
- name: Node Build
become: true
- become_user: opensrf
npm: path={{repo_base}}/Evergreen/Open-ILS/web/js/ui/default/staff
- name: Grunt Build
shell: >
- name: Install NGINX Configs
become: true
copy:
+ remote_src: true
src: "{{repo_base}}/OpenSRF/examples/nginx/osrf-ws-http-proxy"
dest: /etc/nginx/sites-available/osrf-ws-http-proxy
- name: Link NGINX Configs
become: true
when: use_rsyslog
copy:
+ remote_src: true
src: "{{repo_base}}/Evergreen/Open-ILS/examples/evergreen-rsyslog.conf"
dest: /etc/rsyslog.d/evergreen.conf
- name: Restart Rsyslog
- name: Copy Example Websockets apache2.conf
become: true
copy:
+ remote_src: true
src: "{{repo_base}}/OpenSRF/examples/apache_24/websockets/apache2.conf"
dest: /etc/apache2-websockets/apache2.conf
when: websocketsconf.stat.isdir is not defined
# Author: Bill Erickson <berickxx@gmail.com>
- hosts: '{{hosts}}'
- connection: local
- # Every command not explicitly run by opensrf/postgres requires root.
remote_user: '{{deploy_user}}'
become_method: sudo
vars_files: