Changeset 38573 for main


Ignore:
Timestamp:
2024-01-19T13:51:25+13:00 (5 months ago)
Author:
davidb
Message:

Copy tidy up, removing commented out blocks

Location:
main/trunk/greenstone3/src/ansible-playbooks
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/ansible-playbooks/greenstone3-svn-base-playbook.yml

    r38570 r38573  
    88# Greenstone installation is to occur (i.e., localhost)
    99
    10 # To run this playbook to svn checkout Greenstone3 and compile it up:
     10# To directly run this playbook to svn checkout Greenstone3 and compile it up:
    1111#
    1212#     ansible-playbook -l localhost -u $USER ./greenstone3-svn-base-playbook.yml
     
    3131    - debug: msg="gsdl3srchome = {{ hostvars['localhost']['gsdl3srchome'] }}"
    3232   
    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 
    4133    - name: Setting Greenstone3 username
    4234      set_fact: gsdl3_user="{{ ansible_user | default(ansible_env.USER,true) | default('greenstone',true) }}"
     
    116108    register:   env_file_result
    117109
    118 #  - name: Source Greenstone3's SETUP.bash  using newer ./SETUP-ENV.sh (Ultimately new appoach not needed)
    119 #    ansible.builtin.command: ./SETUP-ENV.sh
    120 #    args:
    121 #      chdir:      "{{ gsdl3srchome }}"     
    122 #    register:   env_file_result
    123 
    124 #  - name: Deprecated 'source' Greenstone3's SETUP.bash (command)
    125 #    ansible.builtin.command:
    126 #      # executable: /bin/bash
    127 #      chdir:      "{{ gsdl3srchome }}"     
    128 #      cmd:        ./SETUP-ENV.sh
    129 #    register:   env_file_result
    130 
    131 
    132 #    #- debug: var=env_file_result.stdout_lines
     110  #- debug: var=env_file_result.stdout_lines
    133111
    134112  - name: Parse Greenstone3 environment variables
     
    136114      env_vars: "{{ ('{' + env_file_result.stdout_lines | map('regex_replace', '([^=]*)=(.*)', '\"\\1\": \"\\2\"') | join(',') + '}') | from_json }}"
    137115
    138 #  - name: Display environment variables
    139 #    command: env
    140 #    environment: "{{ env_vars }}"
    141 
    142    #- debug: var=env_vars
    143 
     116  #- debug: var=env_vars
    144117
    145118  - name: Generate build.properties for Greenstone3
     
    149122    environment: "{{ env_vars }}"
    150123
    151 #  - name: Deprecated Setting localhost.port.http in build.properties (only changes 1 value)
    152 #    ansible.builtin.lineinfile:
    153 #      path: "{{ gsdl3srchome }}/build.properties"
    154 #      regexp: '^localhost.port.http='
    155 #      line: localhost.port.http={{ gsdl3_buildproperties_port }}
    156 
    157124  - name: Setting ports in build.properties
    158125    ansible.builtin.lineinfile:
    159126      path:   "{{ gsdl3srchome }}/build.properties"
    160127      regexp: '^{{ item }}='
    161       #line:   "{{ item }}={{ hostvars['localhost']['gsdl3_buildproperties_ports'][item] }}"
    162128      line:   "{{ item }}={{ gsdl3_buildproperties_ports[item] }}"     
    163129    with_items:
     
    176142    environment: "{{ env_vars }}"
    177143
    178 #  - name: Prepare Greenstone3 (A more complicated approach using 'expect')
    179 #    ansible.builtin.expect:
    180 #      chdir:       "{{ gsdl3srchome }}"
    181 #      command:     ant prepare
    182 #      timeout:     null
    183 #      responses:
    184 #        "\\[input\\]\\s+\\(y, n\\)": "y"
    185 #    environment: "{{ env_vars }}"
    186 
    187 #  - name: Prepare Greenstone3 II (untested, and even more complicated, requiring 'expect' to be installed)
    188 #    ansible.builtin.shell: |
    189 #      cd {{ gsdl3srchome }}
    190 #      . ./SETUP.bash
    191 #      spawn ant prepare
    192 #      expect "[input]      (y, n):"
    193 #      send "y\n"
    194 #
    195 #      exit 0
    196 #    args:
    197 #      executable: /usr/bin/expect
    198 
    199 
    200144  - name: Compile and Install Greenstone3 (command)
    201145    ansible.builtin.command:
     
    204148    environment: "{{ env_vars }}"
    205149
    206 #  - name: Compile and Install Greenstone3 (shell)
    207 #    ansible.builtin.shell:
    208 #      chdir: "{{ gsdl3srchome }}"
    209 #      cmd:   . ./SETUP.bash && ant install
    210    
  • main/trunk/greenstone3/src/ansible-playbooks/reverse-proxy-https-tasks.yml

    r38571 r38573  
    2626
    2727
    28   #- name: Adjusting Greenstone3 installations index.html to work in Apache2 DocumentRoot
    29   #  ansible.builtin.replace:
    30   #    path:   "{{ gsdl3srchome }}/web/index.html"
    31   #    regexp:  'href="(?!http://|/)'
    32   #    replace: 'href="/{{ gsdl3servlet_external.context }}/'
    33 
    34 
    3528#    - name: "UFW - Allow HTTPS on port {{ gsdl3servlet_external.port | default('443',true) }}"
    3629#      ufw:
  • main/trunk/greenstone3/src/ansible-playbooks/reverse-proxy-playbook.yml

    r38568 r38573  
    3838        gsdl3servlet_external: "{{ gsdl3servlet_external | combine ({'domain_url': gsdl3servlet_external_domain_url}) }}"
    3939
    40     # Apache2
     40    #
     41    # Apache2 http setup
     42    #
    4143    - include_tasks: reverse-proxy-http-tasks.yml
    4244
     
    7678      when: apache2_as_revproxy != true
    7779
    78 
     80    #
     81    # Apache2 https setup
     82    #
    7983    - include_tasks: reverse-proxy-https-tasks.yml
    8084      when: apache2_revproxy_config.https_port is defined
Note: See TracChangeset for help on using the changeset viewer.