Skip to content

Change verbosity of installer script #1

@mtulio

Description

@mtulio

Proposed feature

Stdout script does not need to be verbose as it is. One ideia is to ignore stdout and log only stderr:

TASK [omsagent.chaordic : run script (can take a couple of minutes)] ***********************************************
Friday 14 August 2020  14:58:43 -0300 (0:00:00.045)       0:00:21.417 ********* 
fatal: [X.Y.Z.W]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": true, "cmd": ["/tmp/onboard_agent.sh"], "delta": "0:00:01.838361", "end": "2020-08-14 17:58:45.196673", "msg": "non-zero return code", "rc": 61, "start": "2020-08-14 17:58:43.358312", "stderr": "--2020-08-14 17:58:43--  https://github.com/microsoft/OMS-Agent-for-Linux/releases/download/OMSAgent_v1.13.9-0/omsagent-1.13.9-0.universal.x64.sh\nResolving github.com (github.com)... 140.82.112.3\nConnecting to github.com (github.com)|140.82.112.3|:443... connected.\nHTTP request sent, awaiting response... 302 Found\nLocation: https://github-production-release-asset-2e65be.s3.amazonaws.com/43709699/675ab800-dca3-11ea-9c7c-e1521faa2992?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200814%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200814T175843Z&X-Amz-Expires=300&X-Amz-Signature=45a99404c9a3fd462020940e4f5615404e62e77511a3d644d55082344df4ddb3&X-Amz-SignedHeaders=host&actor_id=0&repo_id=43709699&response-content-disposition=attachment%3B%20filename%3Domsagent-1.13.9-0.universal.x64.sh&response-content-type=application%2Foctet-stream [following]\n--2020-08-14 17:58:43--  https://github-production-release-asset-2e65be.s3.amazonaws.com/43709699/675ab800-dca3-11ea-9c7c-e1521faa2992?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200814%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200814T175843Z&X-Amz-Expires=300&X-Amz-Signature=45a99404c9a3fd462020940e4f5615404e62e77511a3d644d55082344df4ddb3&X-Amz-SignedHeaders=host&actor_id=0&repo_id=43709699&response-content-disposition=attachment%3B%20filename%3Domsagent-1.13.9-0.universal.x64.sh&response-content-type=application%2Foctet-stream\nResolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.217.14.172\nConnecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.217.14.172|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 140652376 (134M) [application/octet-stream]\nSaving to: ‘omsagent-1.13.9-0.universal.x64.sh’\n\n     0K .......... .......... .......... .......... ..........  0% 35.1M 4s\n    50K .......... .......... .......... .......... ..........  0% 34.6M 4s\n   100K .......... .......... .......... .......... ..........  0% 48.3M 3s\n   150K .......... .......... .......... .......... ..........  0% 38.6M 3s\n   200K .......... .......... .......... .......... ..........  0% 51.8M 3s\n   250K .......... .......... .......... .......... ..........  0% 60.5M 3s\n   300K .......... .......... .......... .......... ..........  0% 45.2M 3s\n   350K .......... .......... .......... .......... ..........  0% 58.7M 3s\n   400K .......... .......... .......... .......... ..........  0% 64.4M 3s\n   450K .......... .......... .......... .......... ..........  0% 2.24M 9s\n   500K .......... .......... .......... .......... ..........  0%  800K 23s\n   550K .......... .......... .......... .......... ..........  0% 20.0M 22s\n   600K .......... .......... .......... .......... ..........  0%  651K 36s\n   650K .......... .......... .......... .......... ..........  0% 54.5M 34s\n   700K .......... .......... .......... .......... ..........  0% 72.5M 32s\n   750K .......... .......... .......... .......... ..........  0% 89.0M 30s\n   800K .......... .......... .......... .......... ..........  0% 73.1M 28s\n   850K .......... .......... .......... .......... ..........  0% 70.2M 27s\n   900K .......... .......... .......... .......... ..........  0% 76.4M 25s\n   950K .......... .......... .......... .......... ..........  0%  108M 24s\n  1000K .......... .......... .......... .......... ..........  0% 85.5M 23s\n  1050K .......... .......... .......... .......... ..........  0% 67.2M 22s\n  1100K .......... .......... .......... .......... ..........  0% 82.3M 21s\n  1150K .......... .......... .......... .......... ..........  0%  103M 20s\n  1200K .......... .......... .......... .......... ..........  0%  115M 20s\n  1250K .......... .......... .......... .......... ..........  0%  107M 19s\n  1300K .......... .......... .......... .......... ..........  0%  137M 18s\n  1350K .......... .......... .......... .......... ..........  1%  108M 18s\n  1400K .......... .......... .......... .......... ..........  1% 90.8M 17s\n  1450K .......... .......... .......... .......... ..........  1% 70.2M 17s\n  1500K .......... .......... .......

.....

Rationale

Avoid too much information on the terminal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions