mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 19:22:24 +00:00
Cleaner sed in nextcloud, postgresql, iiab-diagnostics
This commit is contained in:
parent
0a114af24e
commit
b8e0b5e13a
3 changed files with 14 additions and 14 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
# - name: Try to run 'php -v' to get PHP version
|
||||
# # e.g. converts multi-line "PHP 7.0.33-0ubuntu0.16.04.5 (cli) ( NTS ) ..." to "7.0.33"
|
||||
# shell: php -v | head -1 | sed 's/^[^0-9.]*//' | sed 's/[^0-9.].*//'
|
||||
# shell: php -v | head -1 | sed 's/^[^0-9.]*//; s/[^0-9.].*//'
|
||||
# register: php_version_installed
|
||||
# #ignore_errors: yes # NOT NEC: if php is not installed, php_version_installed.stdout will get set to ""
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
state: present
|
||||
|
||||
- name: Run shell command "pg_config --version" to extract MAJOR version number -- strip off MINOR/PATCH version number(s)
|
||||
shell: pg_config --version | sed 's/^[^0-9]*//' | sed 's/[^0-9].*//'
|
||||
shell: pg_config --version | sed 's/^[^0-9]*//; s/[^0-9].*//'
|
||||
register: pg_config_version
|
||||
|
||||
- name: 'Dynamically set Ansible var "postgresql_version: {{ pg_config_version.stdout }}"'
|
||||
|
|
|
@ -8,18 +8,18 @@ IIAB_RELEASE=$(cat /etc/iiab/iiab.env | grep IIAB_RELEASE | cut -d'=' -f2)
|
|||
OS_VER=$(cat /etc/iiab/iiab.env | grep OS_VER | cut -d'=' -f2)
|
||||
YMDT=$(date +%F_%T_%Z)
|
||||
|
||||
git config --global --add safe.directory /opt/iiab/iiab # Nec below, if non-root
|
||||
HASH1=$(cd /opt/iiab/iiab; git log --pretty=format:'%H' -n 1) # --pretty=format:'%h' (8 chars)
|
||||
BRANCH1=$(cd /opt/iiab/iiab; git branch --show-current)
|
||||
REMOTE_URL1=$(cd /opt/iiab/iiab; git config remote.$(git config branch.$BRANCH1.remote).url)
|
||||
PR_COUNT1=$(cd /opt/iiab/iiab; git log "$(git describe --tags --abbrev=0)..HEAD" --oneline --grep='Merge pull request' | wc -l)
|
||||
TAG_COMMITS1=$(cd /opt/iiab/iiab; git describe --tags | sed 's/-[^-]*$//' | sed 's/-\([[:digit:]][[:digit:]]*\)$/ (\1 commits)/')
|
||||
git config --global --add safe.directory /opt/iiab/iiab-admin-console # Nec below, if non-root
|
||||
HASH2=$(cd /opt/iiab/iiab-admin-console; git log --pretty=format:'%H' -n 1)
|
||||
BRANCH2=$(cd /opt/iiab/iiab-admin-console; git branch --show-current)
|
||||
REMOTE_URL2=$(cd /opt/iiab/iiab-admin-console; git config remote.$(git config branch.$BRANCH2.remote).url)
|
||||
PR_COUNT2=$(cd /opt/iiab/iiab-admin-console; git log "$(git describe --tags --abbrev=0)..HEAD" --oneline --grep='Merge pull request' | wc -l)
|
||||
TAG_COMMITS2=$(cd /opt/iiab/iiab-admin-console; git describe --tags | sed 's/-[^-]*$//' | sed 's/-\([[:digit:]][[:digit:]]*\)$/ (\1 commits)/')
|
||||
# git config --global --add safe.directory /opt/iiab/iiab # Nec below, if non-root
|
||||
# HASH1=$(cd /opt/iiab/iiab; git log --pretty=format:'%H' -n 1) # --pretty=format:'%h' (8 chars)
|
||||
# BRANCH1=$(cd /opt/iiab/iiab; git branch --show-current)
|
||||
# REMOTE_URL1=$(cd /opt/iiab/iiab; git config remote.$(git config branch.$BRANCH1.remote).url)
|
||||
# PR_COUNT1=$(cd /opt/iiab/iiab; git log "$(git describe --tags --abbrev=0)..HEAD" --oneline --grep='Merge pull request' | wc -l)
|
||||
# TAG_COMMITS1=$(cd /opt/iiab/iiab; git describe --tags | sed 's/-[^-]*$//; s/-\([[:digit:]][[:digit:]]*\)$/ (\1 commits)/')
|
||||
# git config --global --add safe.directory /opt/iiab/iiab-admin-console # Nec below, if non-root
|
||||
# HASH2=$(cd /opt/iiab/iiab-admin-console; git log --pretty=format:'%H' -n 1)
|
||||
# BRANCH2=$(cd /opt/iiab/iiab-admin-console; git branch --show-current)
|
||||
# REMOTE_URL2=$(cd /opt/iiab/iiab-admin-console; git config remote.$(git config branch.$BRANCH2.remote).url)
|
||||
# PR_COUNT2=$(cd /opt/iiab/iiab-admin-console; git log "$(git describe --tags --abbrev=0)..HEAD" --oneline --grep='Merge pull request' | wc -l)
|
||||
# TAG_COMMITS2=$(cd /opt/iiab/iiab-admin-console; git describe --tags | sed 's/-[^-]*$//; s/-\([[:digit:]][[:digit:]]*\)$/ (\1 commits)/')
|
||||
|
||||
echo -e "\nGathers IIAB diagnostics into 1 file, to accelerate troubleshooting. USAGE:"
|
||||
echo
|
||||
|
|
Loading…
Reference in a new issue