Ignore:
Timestamp:
2024-01-12T13:20:21+13:00 (5 months ago)
Author:
davidb
Message:

Script improvements/tidy-up

File:
1 edited

Legend:

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

    r38527 r38528  
    3434    - name: Setting gsdl3srchome
    3535      set_fact: gsdl3srchome="{{ gsdl3srchome }}"
    36     - debug: msg="{{ hostvars['localhost']['gsdl3srchome'] }}"
     36    - debug: msg="gsdl3srchome = {{ hostvars['localhost']['gsdl3srchome'] }}"
    3737   
    3838    - name: Setting gsdl3port
    3939      set_fact: gsdl3port="{{ gsdl3port }}"
    40     - debug: msg="{{ hostvars['localhost']['gsdl3port'] }}"
     40    - debug: msg="gsdl3port = {{ hostvars['localhost']['gsdl3port'] }}"
    4141   
    4242
     
    9191      dest: "{{ gsdl3srchome }}"
    9292
    93   - name: Downloading and unpacking self-contained command-line tools for Greenstone3 (JDK, Apache Ant)
     93  - name: Downloading and unpacking self-contained command-line tools for Greenstone3
    9494    ansible.builtin.shell:
    9595      chdir:     "{{ gsdl3srchome }}/ext-cli"
    96       cmd:       "./get-selfcontained-jdk.sh && ./get-selfcontained-ant.sh"
     96      # cmd:       "./get-selfcontained-jdk.sh && ./get-selfcontained-ant.sh"
     97      cmd:       "./get-selfcontained-{{ item }}.sh"
     98    register:  result
     99    changed_when:
     100      - '"Untarred" in result.stdout'     
     101    with_items:
     102      - jdk
     103      - ant
    97104
    98105  # The next two steps are equivalent to sourcing SETUP.bash
     
    100107  #   https://stackoverflow.com/questions/60209185/ansible-environment-variables-from-env-file
    101108  #
     109  - name: Source Greenstone3's SETUP.bash
     110    ansible.builtin.shell:
     111      executable: /bin/bash
     112      chdir:      "{{ gsdl3srchome }}"     
     113      cmd:        . ./SETUP.bash 1>/dev/null 2>&1 && env
     114    register:   env_file_result
     115
    102116#  - name: Source Greenstone3's SETUP.bash  using newer ./SETUP-ENV.sh (Ultimately new appoach not needed)
    103117#    ansible.builtin.command: ./SETUP-ENV.sh
     
    113127#    register:   env_file_result
    114128
    115   - name: Source Greenstone3's SETUP.bash
    116     ansible.builtin.shell:
    117       executable: /bin/bash
    118       chdir:      "{{ gsdl3srchome }}"     
    119       cmd:        . ./SETUP.bash 1>/dev/null 2>&1 && env
    120     register:   env_file_result
    121129
    122 - debug: var=env_file_result.stdout_lines
     130  #- debug: var=env_file_result.stdout_lines
    123131
    124132  - name: Parse Greenstone3 environment variables
     
    130138#    environment: "{{ env_vars }}"
    131139
    132 - debug: var=env_vars
     140   #- debug: var=env_vars
    133141
    134142
Note: See TracChangeset for help on using the changeset viewer.