- Timestamp:
- 2024-01-19T11:30:46+13:00 (4 months ago)
- Location:
- main/trunk/greenstone3/src/ansible-playbooks
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/ansible-playbooks/_local_config.bash
r38534 r38570 1 if [ $# != 1 ] ; then 1 2 if [ $# -gt 1 ] || [ "x$1" == "x-help" ] || [ "x$1" == "x--help" ] ; then 2 3 echo "" >&2 3 4 echo "Usage: $0 localhost-username" >&2 … … 9 10 fi 10 11 11 localhost_username=$1 12 localhost_username=${1:-greenstone} 13 14 echo "" 15 echo "####" 16 echo "# Away to run the playbook with {{ remote_user }}:" 17 echo "# $localhost_username" 18 ##echo "# Setting the username to install Greenstone3 as to:" 19 ##echo "# $localhost_username" 20 echo "####" 21 echo "" 22 23 if [ ! -d "/home/$localhost_username" ] ; then 24 25 echo "! Warning: Failed to detect /home/$localhost_username as a home directory" >&2 26 echo "! " >&2 27 echo "! Note: You can control the username used by providing it as a command-line argument" >&2 28 echo "! when the ansible playbook is run." >&2 29 echo "! " >&2 30 echo "! Or alternatively: consider using 'sudo adduser' (or similar) to create an account" >&2 31 echo "! for the missing user" >&2 32 echo "" >&2 33 fi 34 35 echo "" 36 echo "Continuing in 5 seconds ..." 37 echo "[press <enter> to proceed immediately, or 'q' to quit]" 38 read -t 5 continue_answer 39 40 if [ $? == 0 ] ; then 41 # keyboard input given 42 43 if [ "x$continue_answer" == "xq" ] ; then 44 exit 1 45 fi 46 fi 47 48 49 50 -
main/trunk/greenstone3/src/ansible-playbooks/greenstone3-svn-base-playbook.yml
r38538 r38570 31 31 - debug: msg="gsdl3srchome = {{ hostvars['localhost']['gsdl3srchome'] }}" 32 32 33 - name: Setting gsdl3port 34 set_fact: gsdl3port="{{ gsdl3port }}" 35 - debug: msg="gsdl3port = {{ hostvars['localhost']['gsdl3port'] }}" 36 37 - name: Setting gsdl3ports 38 set_fact: gsdl3ports="{{ gsdl3ports }}" 39 - debug: msg="gsdl3ports = {{ hostvars['localhost']['gsdl3ports'] }}" 33 # - name: Setting gsdl3port 34 # set_fact: gsdl3port="{{ gsdl3port }}" 35 # - debug: msg="gsdl3port = {{ hostvars['localhost']['gsdl3port'] }}" 36 37 # - name: Setting gsdl3_buildproperties_ports 38 # set_fact: gsdl3_buildproperties_ports="{{ gsdl3_buildproperties_ports }}" 39 # - debug: msg="gsdl3_buildproperties_ports = {{ hostvars['localhost']['gsdl3_buildproperties_ports'] }}" 40 41 - name: Setting Greenstone3 username 42 set_fact: gsdl3_user="{{ ansible_user | default(ansible_env.USER,true) | default('greenstone',true) }}" 43 - debug: msg="gsdl3_user = {{ hostvars['localhost']['gsdl3_user'] }}" 40 44 41 45 … … 58 62 59 63 # As well as using 'unzip', the greenstone3 compile sequence currently uses 60 61 64 # 'zip' in a handful of places, such as: 65 # <gsdl3srchome>/gli/makejar.sh 62 66 'zip', 'unzip', 63 67 … … 76 80 hosts: localhost 77 81 connection: local 82 become_user: "{{ gsdl3_user }}" 78 83 vars_files: 79 84 - vars/default-core.yml 80 85 81 86 tasks: 87 - debug: msg="gsdl3_user = {{ gsdl3_user }}, USER={{ ansible_env.USER }}" 82 88 - name: Subversion checkout of Greenstone3 83 89 ansible.builtin.subversion: … … 147 153 # path: "{{ gsdl3srchome }}/build.properties" 148 154 # regexp: '^localhost.port.http=' 149 # line: localhost.port.http={{ gsdl3 port }}155 # line: localhost.port.http={{ gsdl3_buildproperties_port }} 150 156 151 157 - name: Setting ports in build.properties … … 153 159 path: "{{ gsdl3srchome }}/build.properties" 154 160 regexp: '^{{ item }}=' 155 line: "{{ item }}={{ hostvars['localhost']['gsdl3ports'][item] }}" 161 #line: "{{ item }}={{ hostvars['localhost']['gsdl3_buildproperties_ports'][item] }}" 162 line: "{{ item }}={{ gsdl3_buildproperties_ports[item] }}" 156 163 with_items: 157 164 - "localhost.port.http" -
main/trunk/greenstone3/src/ansible-playbooks/vars/default-core.yml
r38566 r38570 2 2 # gsdl3srchome: /home/{{ ansible_user }}/greenstone3-svn 3 3 # gsdl3srchome: /mnt/<mydisk>/greenstone3-svn 4 gsdl3srchome: /mnt/intermuse/greenstone3-ansible-svn 4 #gsdl3srchome: /mnt/intermuse/greenstone3-ansible-svn 5 gsdl3srchome: /mnt/intermuse/greenstone3-ansible3-svn 5 6 6 7 digital_librarian_info: { … … 29 30 30 31 gsdl3_buildproperties_ports: { 31 "localhost.port.http": "{{ gsdl3servlet_internal. explicit_port }}",32 "localhost.port.http": "{{ gsdl3servlet_internal.port }}", 32 33 33 34 #"tomcat.shutdown.port": 8305, … … 61 62 } 62 63 64 #### 63 65 # Using Apache2 as a reverse-proxy server? 66 #### 64 67 apache2_as_revproxy: true 65 68
Note:
See TracChangeset
for help on using the changeset viewer.