Skip to content

Instantly share code, notes, and snippets.

@sbeliakou
Created March 14, 2021 01:08
Show Gist options
  • Save sbeliakou/ba6d4e2972e213018bf526959cc45dd4 to your computer and use it in GitHub Desktop.
Save sbeliakou/ba6d4e2972e213018bf526959cc45dd4 to your computer and use it in GitHub Desktop.
Cloning into 'volha_huryna'...
name: volha_huryna, master/ce1a2e0 @ 2021-03-11 21:58:59 +0000
2021/03/14 00:51:58 config: tests/tomcat.yml
2021/03/14 00:51:58 verbosity: 2
2021/03/14 00:51:58 -----------------------------------------------------------------------------------
2021/03/14 00:51:58 Running '1.1 Tomcat', 1..16 tests
2021/03/14 00:51:58 -----------------------------------------------------------------------------------
2021/03/14 00:52:05 ✓ [1.1 Tomcat] => playbook lint (ansible-lint) (1), 3.854s
2021/03/14 00:52:05 ✓ [1.1 Tomcat] => playbook syntax check (--syntax-check) (1), 675ms
2021/03/14 00:53:53 ✓ [1.1 Tomcat] => apply playbook (3), 1m47.836s
2021/03/14 00:53:53 ✓ [1.1 Tomcat] => service process should run after rollout (2), 266ms
2021/03/14 00:53:58 ✓ [1.1 Tomcat] => responds 200 (2), 1.26s
2021/03/14 00:54:21 ✓ [1.1 Tomcat] => idempotency check (3), 23.663s
2021/03/14 00:54:22 ✓ [1.1 Tomcat] => should run after 2nd apply (2), 208ms
2021/03/14 00:54:22 ✓ [1.1 Tomcat] => shouldn't restart (3), 253ms
2021/03/14 00:54:22 ✓ [1.1 Tomcat] => service is enabled (1), 175ms
2021/03/14 00:54:22 ✓ [1.1 Tomcat] => 'tomcat_user' variable set as required (1), 57ms
2021/03/14 00:54:22 ✓ [1.1 Tomcat] => 'tomcat_group' variable set as required (1), 68ms
2021/03/14 00:56:18 ✓ [1.1 Tomcat] => service is running under non-priviliged user as per tomcat_user/tomcat_group (1), 1m56.115s
2021/03/14 00:56:18 ✓ [1.1 Tomcat] => 'tomcat_url' variable set as required (1), 36ms
2021/03/14 00:56:18 ✓ [1.1 Tomcat] => 'tomcat_home' variable set as required (1), 101ms
2021/03/14 00:58:10 ✓ [1.1 Tomcat] => can install into different home (1), 1m51.491s
2021/03/14 00:59:59 ✓ [1.1 Tomcat] => can apply under non-root user (3), 1m49.195s
2021/03/14 01:00:00 -----------------------------------------------------------------------------------
2021/03/14 01:00:00 Tests Summary:
2021/03/14 01:00:00 16 (of 16) tests passed, 0 tests failed; rated as 100.00%
2021/03/14 01:00:00
2021/03/14 01:00:00 Time Spent: 8m1.452s
2021/03/14 01:00:00 -----------------------------------------------------------------------------------
name: volha_huryna, master/ce1a2e0 @ 2021-03-11 21:58:59 +0000
2021/03/14 01:00:00 config: tests/webapp.yml
2021/03/14 01:00:00 verbosity: 2
2021/03/14 01:00:00 -----------------------------------------------------------------------------------
2021/03/14 01:00:00 Running '1.2 WebApp', 1..21 tests
2021/03/14 01:00:00 -----------------------------------------------------------------------------------
2021/03/14 01:00:06 ✓ [1.2 WebApp] => playbook lint (ansible-lint) (1), 3.591s
2021/03/14 01:00:06 ✓ [1.2 WebApp] => playbook syntax check (--syntax-check) (1), 740ms
2021/03/14 01:00:32 ✓ [1.2 WebApp] => apply plybook (2), 25.261s
2021/03/14 01:00:32 ✓ [1.2 WebApp] => 'webapp-server' is running (2), 184ms
2021/03/14 01:00:32 ✓ [1.2 WebApp] => service responds 200 (2), 175ms
2021/03/14 01:01:02 ✓ [1.2 WebApp] => playbook idempotency check (2), 29.684s
2021/03/14 01:01:02 ✓ [1.2 WebApp] => service shouldn't restart (2), 185ms
2021/03/14 01:01:02 ✓ [1.2 WebApp] => service should run after 2nd apply (2), 174ms
2021/03/14 01:01:02 ✓ [1.2 WebApp] => service is enabled (1), 189ms
2021/03/14 01:01:32 ✗ [1.2 WebApp] -> can use 'student_first_name/student_last_name' variables
2021/03/14 01:01:32 Result: exit status 1
2021/03/14 01:01:32 Output:
(run, /tmp/students-1/volha_huryna/day1/1.2) => ansible-playbook webapp-server.yml -i web-server, -e student_first_name=James -e student_last_name=Ross
rc: 0
output: |
PLAY [Installing webapp-server] ************************************************
TASK [Gathering Facts] *********************************************************
ok: [web-server]
TASK [Create webapp-server Group] **********************************************
ok: [web-server]
TASK [Add user "webapp-server"] ************************************************
ok: [web-server]
TASK [Create /bin folder] ******************************************************
ok: [web-server]
TASK [Create /conf folder] *****************************************************
ok: [web-server]
TASK [Download webapp] *********************************************************
ok: [web-server]
TASK [Copy Users Configuration] ************************************************
changed: [web-server]
TASK [Copy webapp-server Service File] *****************************************
ok: [web-server]
TASK [Ensure webapp-server Service Enabled and Running] ************************
ok: [web-server]
TASK [Wait for Webapp Service start] *******************************************
ok: [web-server]
RUNNING HANDLER [webapp-server restart] ****************************************
changed: [web-server]
PLAY RECAP *********************************************************************
web-server : ok=11  changed=2  unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost:8080
> Accept: */*
>
< HTTP/1.1 200 OK
< Expires: 0
< Pragma: no-cache
< Date: Sun, 14 Mar 2021 01:01:32 GMT
< Content-Length: 189
< Content-Type: text/plain; charset=utf-8
<
{ [data not shown]
* Connection #0 to host localhost left intact
(run, /tmp/students-1/volha_huryna/day1/1.2) => docker exec web-server curl -vsL --connect-timeout 1 localhost:8080
rc: 0
output: |
{
"logo": "https://playpit-labs-assets.s3-eu-west-1.amazonaws.com/images/Ansible_logo.svg.png",
"message": "Done by Ansible",
"student": "JamesRoss",
"path": "/",
"version": "1.0.0"
}
Stdout Assertion Failed (Partial, 'James Ross')
2021/03/14 01:06:52 ✗ [1.2 WebApp] -> can set custom port
2021/03/14 01:06:52 Result: exit status 1
2021/03/14 01:06:52 Output:
(run, /tmp/students-1/volha_huryna/day1/1.2) => ansible-playbook webapp-server.yml -i web-server, -e student_first_name=James -e student_last_name=Ross -e webapp_port=8081
rc: 2
output: |
PLAY [Installing webapp-server] ************************************************
TASK [Gathering Facts] *********************************************************
ok: [web-server]
TASK [Create webapp-server Group] **********************************************
ok: [web-server]
TASK [Add user "webapp-server"] ************************************************
ok: [web-server]
TASK [Create /bin folder] ******************************************************
ok: [web-server]
TASK [Create /conf folder] *****************************************************
ok: [web-server]
TASK [Download webapp] *********************************************************
ok: [web-server]
TASK [Copy Users Configuration] ************************************************
changed: [web-server]
TASK [Copy webapp-server Service File] *****************************************
ok: [web-server]
TASK [Ensure webapp-server Service Enabled and Running] ************************
ok: [web-server]
TASK [Wait for Webapp Service start] *******************************************
fatal: [web-server]: FAILED! => {"ansible_facts": {}, "changed": false, "elapsed": 300, "msg": "Timeout when waiting for 127.0.0.1:8081"}
RUNNING HANDLER [webapp-server restart] ****************************************
PLAY RECAP *********************************************************************
web-server : ok=9  changed=1  unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
CMD Failed:
2021/03/14 01:06:52 ✗ [1.2 WebApp] -> use 'checksum' when downloading WebApp binary (get_url)
2021/03/14 01:06:52 Result: exit status 1
2021/03/14 01:06:52 Output:
2021/03/14 01:06:53 ✓ [1.2 WebApp] => service is running under 'webapp-server:webapp-server' (1), 568ms
2021/03/14 01:06:53 ✓ [1.2 WebApp] => app/service user has no password set (1), 223ms
2021/03/14 01:06:53 ✓ [1.2 WebApp] => playbook has no hardcoded 'webapp_user' (1), 20ms
2021/03/14 01:06:53 ✓ [1.2 WebApp] => playbook has no hardcoded 'webapp_group' (1), 22ms
2021/03/14 01:07:25 ✓ [1.2 WebApp] => can use 'webapp_user/webapp_group' variables (1), 31.77s
2021/03/14 01:07:53 ✓ [1.2 WebApp] => can install into different home dir (1), 28.173s
2021/03/14 01:07:53 ✓ [1.2 WebApp] => can use different source url (1), 10ms
2021/03/14 01:08:24 ✓ [1.2 WebApp] => can apply under non-root user (1), 30.717s
2021/03/14 01:08:24 ✓ [1.2 WebApp] => playbook has 'handlers' (1), 13ms
2021/03/14 01:08:24 -----------------------------------------------------------------------------------
2021/03/14 01:08:24 Tests Summary:
2021/03/14 01:08:24 18 (of 21) tests passed, 3 tests failed; rated as 88.89%
2021/03/14 01:08:24
2021/03/14 01:08:24 Time Spent: 8m24.277s
2021/03/14 01:08:24 -----------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment