Skip to content

Instantly share code, notes, and snippets.

@sbeliakou
Created March 14, 2021 00:51
Show Gist options
  • Save sbeliakou/3f422b7c74ee5e81322e12288c7f84a6 to your computer and use it in GitHub Desktop.
Save sbeliakou/3f422b7c74ee5e81322e12288c7f84a6 to your computer and use it in GitHub Desktop.
Cloning into 'vitali_lukashevich1'...
name: vitali_lukashevich1, master/a4c5b61 @ 2021-03-11 21:58:36 +0000
2021/03/14 00:42:43 config: tests/tomcat.yml
2021/03/14 00:42:43 verbosity: 2
2021/03/14 00:42:43 -----------------------------------------------------------------------------------
2021/03/14 00:42:43 Running '1.1 Tomcat', 1..16 tests
2021/03/14 00:42:43 -----------------------------------------------------------------------------------
2021/03/14 00:42:49 ✓ [1.1 Tomcat] => playbook lint (ansible-lint) (1), 3.858s
2021/03/14 00:42:49 ✓ [1.1 Tomcat] => playbook syntax check (--syntax-check) (1), 716ms
2021/03/14 00:44:32 ✓ [1.1 Tomcat] => apply playbook (3), 1m43.151s
2021/03/14 00:44:33 ✓ [1.1 Tomcat] => service process should run after rollout (2), 220ms
2021/03/14 00:44:37 ✓ [1.1 Tomcat] => responds 200 (2), 1.35s
2021/03/14 00:44:51 ✓ [1.1 Tomcat] => idempotency check (3), 14.106s
2021/03/14 00:44:51 ✓ [1.1 Tomcat] => should run after 2nd apply (2), 232ms
2021/03/14 00:44:52 ✓ [1.1 Tomcat] => shouldn't restart (3), 239ms
2021/03/14 00:44:52 ✓ [1.1 Tomcat] => service is enabled (1), 152ms
2021/03/14 00:44:52 ✓ [1.1 Tomcat] => 'tomcat_user' variable set as required (1), 77ms
2021/03/14 00:44:52 ✓ [1.1 Tomcat] => 'tomcat_group' variable set as required (1), 82ms
2021/03/14 00:46:33 ✓ [1.1 Tomcat] => service is running under non-priviliged user as per tomcat_user/tomcat_group (1), 1m40.724s
2021/03/14 00:46:33 ✓ [1.1 Tomcat] => 'tomcat_url' variable set as required (1), 30ms
2021/03/14 00:46:33 ✓ [1.1 Tomcat] => 'tomcat_home' variable set as required (1), 88ms
2021/03/14 00:48:15 ✓ [1.1 Tomcat] => can install into different home (1), 1m42.533s
2021/03/14 00:50:00 ✓ [1.1 Tomcat] => can apply under non-root user (3), 1m44.884s
2021/03/14 00:50:01 -----------------------------------------------------------------------------------
2021/03/14 00:50:01 Tests Summary:
2021/03/14 00:50:01 16 (of 16) tests passed, 0 tests failed; rated as 100.00%
2021/03/14 00:50:01
2021/03/14 00:50:01 Time Spent: 7m18.184s
2021/03/14 00:50:01 -----------------------------------------------------------------------------------
name: vitali_lukashevich1, master/a4c5b61 @ 2021-03-11 21:58:36 +0000
2021/03/14 00:50:01 config: tests/webapp.yml
2021/03/14 00:50:01 verbosity: 2
2021/03/14 00:50:01 -----------------------------------------------------------------------------------
2021/03/14 00:50:01 Running '1.2 WebApp', 1..21 tests
2021/03/14 00:50:01 -----------------------------------------------------------------------------------
2021/03/14 00:50:07 ✓ [1.2 WebApp] => playbook lint (ansible-lint) (1), 3.465s
2021/03/14 00:50:08 ✓ [1.2 WebApp] => playbook syntax check (--syntax-check) (1), 778ms
2021/03/14 00:50:22 ✓ [1.2 WebApp] => apply plybook (2), 14.027s
2021/03/14 00:50:22 ✓ [1.2 WebApp] => 'webapp-server' is running (2), 166ms
2021/03/14 00:50:22 ✓ [1.2 WebApp] => service responds 200 (2), 161ms
2021/03/14 00:50:41 ✓ [1.2 WebApp] => playbook idempotency check (2), 18.485s
2021/03/14 00:50:41 ✓ [1.2 WebApp] => service shouldn't restart (2), 175ms
2021/03/14 00:50:41 ✓ [1.2 WebApp] => service should run after 2nd apply (2), 188ms
2021/03/14 00:50:41 ✓ [1.2 WebApp] => service is enabled (1), 168ms
2021/03/14 00:51:01 ✗ [1.2 WebApp] -> can use 'student_first_name/student_last_name' variables
2021/03/14 00:51:01 Result: exit status 1
2021/03/14 00:51:01 Output:
(run, /tmp/students-1/vitali_lukashevich1/day1/1.2) => ansible-playbook webapp-server.yml -i web-server, -e student_first_name=Betty -e student_last_name=Hanson
rc: 0
output: |
PLAY [Installing web-server] ***************************************************
TASK [Gathering Facts] *********************************************************
ok: [web-server]
TASK [Create Application Group] ************************************************
ok: [web-server]
TASK [Add Application User and Insert Group] ***********************************
ok: [web-server]
TASK [Create Folder Bin] *******************************************************
ok: [web-server]
TASK [Create Folder Conf] ******************************************************
ok: [web-server]
TASK [Download Aplication] *****************************************************
ok: [web-server]
TASK [Copy Configuration File] *************************************************
changed: [web-server]
TASK [Copy Systemd Unit File] **************************************************
ok: [web-server]
TASK [Ensure Service Enabled and Running] **************************************
ok: [web-server]
TASK [Wait Port] ***************************************************************
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 00:51:01 GMT
< Content-Length: 191
< Content-Type: text/plain; charset=utf-8
<
{ [data not shown]
* Connection #0 to host localhost left intact
(run, /tmp/students-1/vitali_lukashevich1/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": "BettyHanson",
"path": "/",
"version": "1.0.0"
}
Stdout Assertion Failed (Partial, 'Betty Hanson')
2021/03/14 00:51:01 ✗ [1.2 WebApp] -> can set custom port
2021/03/14 00:51:01 Result: exit status 1
2021/03/14 00:51:01 Output:
grep: webapp-server.conf.j2: No such file or directory
Assertion Failed: '' == ''
2021/03/14 00:51:01 ✗ [1.2 WebApp] -> use 'checksum' when downloading WebApp binary (get_url)
2021/03/14 00:51:01 Result: exit status 1
2021/03/14 00:51:01 Output:
2021/03/14 00:51:01 ✓ [1.2 WebApp] => service is running under 'webapp-server:webapp-server' (1), 561ms
2021/03/14 00:51:01 ✓ [1.2 WebApp] => app/service user has no password set (1), 177ms
2021/03/14 00:51:01 ✓ [1.2 WebApp] => playbook has no hardcoded 'webapp_user' (1), 16ms
2021/03/14 00:51:01 ✓ [1.2 WebApp] => playbook has no hardcoded 'webapp_group' (1), 20ms
2021/03/14 00:51:17 ✓ [1.2 WebApp] => can use 'webapp_user/webapp_group' variables (1), 16.054s
2021/03/14 00:51:37 ✓ [1.2 WebApp] => can install into different home dir (1), 19.277s
2021/03/14 00:51:37 ✓ [1.2 WebApp] => can use different source url (1), 11ms
2021/03/14 00:51:55 ✓ [1.2 WebApp] => can apply under non-root user (1), 18.6s
2021/03/14 00:51:55 ✓ [1.2 WebApp] => playbook has 'handlers' (1), 11ms
2021/03/14 00:51:56 -----------------------------------------------------------------------------------
2021/03/14 00:51:56 Tests Summary:
2021/03/14 00:51:56 18 (of 21) tests passed, 3 tests failed; rated as 88.89%
2021/03/14 00:51:56
2021/03/14 00:51:56 Time Spent: 1m54.638s
2021/03/14 00:51:56 -----------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment