Ignore:
Timestamp:
2024-01-31T17:20:23+13:00 (4 months ago)
Author:
davidb
Message:

Changes after testing on Redhat 8

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

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/ansible-playbooks/01-RUN-ANSIBLE-BASE-INSTALL.sh

    r38536 r38653  
    33. ./_local_config.bash
    44
    5 ansible-playbook -l localhost -u $localhost_username greenstone3-svn-base-playbook.yml
     5
     6
     7
     8ansible-playbook -l localhost -u $localhost_username \
     9    $ap_extra_args $@ \
     10    greenstone3-svn-base-playbook.yml
  • main/trunk/greenstone3/src/ansible-playbooks/_local_config.bash

    r38574 r38653  
    1111
    1212localhost_username=${1:-greenstone}
     13shift
     14
     15ap_extra_args=""
     16echo ""
     17echo "####"
     18echo "# Checking to see if user can 'sudo' without password"
     19
     20if sudo -n true 2>/dev/null; then
     21    echo "#  => yes"
     22else
     23    echo "#  => no"
     24    ap_extra_args="$ap_extra_args    --ask-become-pass"
     25fi
     26
     27echo "####"
     28echo ""
     29
    1330
    1431echo ""
  • main/trunk/greenstone3/src/ansible-playbooks/greenstone3-svn-base-playbook.yml

    r38612 r38653  
    3636
    3737
    38 - name: Installing required command-line tools
     38- name: Installing distribution specific required command-line tools
    3939  hosts:      localhost
    4040  connection: local
     
    4242
    4343  tasks:
    44     - name: Changing Ansible to use 'aptitude' as package installation manager
    45       apt: name=aptitude update_cache=yes state=latest force_apt_get=yes
     44  #- debug: msg="ansible_ditribution = {{ ansible_distribution }}"
     45  #
     46  - name: Debian/Ubuntu command-line tools
     47    include_tasks: greenstone3-svn-base-debian-task.yml
     48    when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
    4649
    47     - name: Ensure that existing packages are up-to-date (within last 30 mins)
    48       apt: update_cache=yes state=latest force_apt_get=yes cache_valid_time=1800
    49 
    50     - name: Install prerequisites
    51       apt: name={{ item }} update_cache=yes state=latest
    52       loop: [
    53         'subversion', 'build-essential', 'wget',
    54 
    55         # As well as using 'unzip', the greenstone3 compile sequence currently uses
    56         # 'zip' in a handful of places, such as:
    57         #     <gsdl3srchome>/gli/makejar.sh
    58         'zip', 'unzip',
    59 
    60         # Choosing to install the latest, rather than work with the one included
    61         # as an Greenstone3 extension, as that latter is getting a bit old
    62         'imagemagick',
    63        
    64         # The following needed for WebSwing on a headless server
    65         'libxrender1', 'libxtst6', 'libxi6', 'xvfb',
    66 
    67         # The following are nice to have in general
    68         'plocate', 'emacs-nox'
    69       ]
     50  - name: CentOS/Red Hat command-line tools
     51    include_tasks: greenstone3-svn-base-centos-task.yml
     52    when: ansible_distribution == 'CentOS' or ansible_distribution == 'RedHat'
    7053
    7154- name: Checking out Greenstone3 code from svn, configure and installing base system
     
    10487    ansible.builtin.shell:
    10588      executable: /bin/bash
    106       chdir:      "{{ gsdl3srchome }}"     
    107       cmd:        . ./SETUP.bash 1>/dev/null 2>&1 && env
     89      chdir:      "{{ gsdl3srchome }}"
     90      # RHEL8.5 introduces a weirdly environemnt variable BASH_FUNC_which%% set to a multi-line JSON value
     91      # => use 'sed' to delete this form 'env' output
     92      cmd:        . ./SETUP.bash 1>/dev/null 2>&1 && env | sed '/^BASH_FUNC_which%%=() {.*$/,/^}$/d'
    10893    register:   env_file_result
    10994
Note: See TracChangeset for help on using the changeset viewer.