Skip to content

Instantly share code, notes, and snippets.

@sbeliakou
Created March 13, 2021 23:25
Show Gist options
  • Save sbeliakou/5be26e9da3ea60ad0ece1cbc3ee39548 to your computer and use it in GitHub Desktop.
Save sbeliakou/5be26e9da3ea60ad0ece1cbc3ee39548 to your computer and use it in GitHub Desktop.
Cloning into 'andrei_karpyza'...
name: andrei_karpyza, master/d19dfd5 @ 2021-03-11 08:38:25 +0000
2021/03/13 23:07:52 config: tests/tomcat.yml
2021/03/13 23:07:52 verbosity: 2
2021/03/13 23:07:52 -----------------------------------------------------------------------------------
2021/03/13 23:07:52 Running '1.1 Tomcat', 1..16 tests
2021/03/13 23:07:52 -----------------------------------------------------------------------------------
2021/03/13 23:08:01 ✓ [1.1 Tomcat] => playbook lint (ansible-lint) (1), 6.732s
2021/03/13 23:08:03 ✓ [1.1 Tomcat] => playbook syntax check (--syntax-check) (1), 1.184s
2021/03/13 23:10:27 ✓ [1.1 Tomcat] => apply playbook (3), 2m24.182s
2021/03/13 23:10:27 ✓ [1.1 Tomcat] => service process should run after rollout (2), 239ms
2021/03/13 23:10:31 ✓ [1.1 Tomcat] => responds 200 (2), 1.354s
2021/03/13 23:10:55 ✓ [1.1 Tomcat] => idempotency check (3), 24.141s
2021/03/13 23:10:56 ✓ [1.1 Tomcat] => should run after 2nd apply (2), 194ms
2021/03/13 23:10:56 ✓ [1.1 Tomcat] => shouldn't restart (3), 201ms
2021/03/13 23:10:56 ✓ [1.1 Tomcat] => service is enabled (1), 200ms
2021/03/13 23:10:56 ✓ [1.1 Tomcat] => 'tomcat_user' variable set as required (1), 83ms
2021/03/13 23:10:56 ✓ [1.1 Tomcat] => 'tomcat_group' variable set as required (1), 75ms
2021/03/13 23:13:10 ✓ [1.1 Tomcat] => service is running under non-priviliged user as per tomcat_user/tomcat_group (1), 2m13.593s
2021/03/13 23:13:10 ✓ [1.1 Tomcat] => 'tomcat_url' variable set as required (1), 49ms
2021/03/13 23:13:10 ✗ [1.1 Tomcat] -> 'tomcat_home' variable set as required
2021/03/13 23:13:10 Result: exit status 1
2021/03/13 23:13:10 Output:
2021/03/13 23:15:20 ✓ [1.1 Tomcat] => can install into different home (1), 2m10.136s
2021/03/13 23:17:27 ✓ [1.1 Tomcat] => can apply under non-root user (3), 2m6.737s
2021/03/13 23:17:27 -----------------------------------------------------------------------------------
2021/03/13 23:17:27 Tests Summary:
2021/03/13 23:17:27 15 (of 16) tests passed, 1 tests failed; rated as 96.30%
2021/03/13 23:17:27
2021/03/13 23:17:27 Time Spent: 9m35.191s
2021/03/13 23:17:27 -----------------------------------------------------------------------------------
name: andrei_karpyza, master/d19dfd5 @ 2021-03-11 08:38:25 +0000
2021/03/13 23:17:27 config: tests/webapp.yml
2021/03/13 23:17:27 verbosity: 2
2021/03/13 23:17:27 -----------------------------------------------------------------------------------
2021/03/13 23:17:27 Running '1.2 WebApp', 1..21 tests
2021/03/13 23:17:27 -----------------------------------------------------------------------------------
2021/03/13 23:17:36 ✓ [1.2 WebApp] => playbook lint (ansible-lint) (1), 6.032s
2021/03/13 23:17:37 ✓ [1.2 WebApp] => playbook syntax check (--syntax-check) (1), 1.249s
2021/03/13 23:18:00 ✓ [1.2 WebApp] => apply plybook (2), 22.964s
2021/03/13 23:18:00 ✓ [1.2 WebApp] => 'webapp-server' is running (2), 282ms
2021/03/13 23:18:01 ✓ [1.2 WebApp] => service responds 200 (2), 232ms
2021/03/13 23:18:23 ✓ [1.2 WebApp] => playbook idempotency check (2), 22.256s
2021/03/13 23:18:23 ✓ [1.2 WebApp] => service shouldn't restart (2), 203ms
2021/03/13 23:18:23 ✓ [1.2 WebApp] => service should run after 2nd apply (2), 182ms
2021/03/13 23:18:23 ✓ [1.2 WebApp] => service is enabled (1), 247ms
2021/03/13 23:18:38 ✓ [1.2 WebApp] => can use 'student_first_name/student_last_name' variables (1), 14.254s
2021/03/13 23:23:52 ✗ [1.2 WebApp] -> can set custom port
2021/03/13 23:23:52 Result: exit status 1
2021/03/13 23:23:52 Output:
(run, /tmp/students-1/andrei_karpyza/day1/1.2) => ansible-playbook webapp-server.yml -i web-server, -e student_first_name=James -e student_last_name=Feth -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 main directory] ***************************************************
ok: [web-server]
TASK [Create conf directory] ***************************************************
ok: [web-server]
TASK [Create bin directory] ****************************************************
ok: [web-server]
TASK [Download executable file] ************************************************
ok: [web-server]
TASK [Copy webapp configuration] ***********************************************
changed: [web-server]
TASK [Copy webapp systemd unit file] *******************************************
ok: [web-server]
TASK [Ensure webapp-server Service Enabled and Running] ************************
ok: [web-server]
TASK [Ensure that port 8080 is used by service] ********************************
fatal: [web-server]: FAILED! => {"ansible_facts": {}, "changed": false, "elapsed": 300, "msg": "Timeout when waiting for 127.0.0.1:8081"}
RUNNING HANDLER [webapp restart] ***********************************************
PLAY RECAP *********************************************************************
web-server : ok=10  changed=1  unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
CMD Failed:
2021/03/13 23:23:53 ✓ [1.2 WebApp] => use 'checksum' when downloading WebApp binary (get_url) (1), 35ms
2021/03/13 23:23:53 ✓ [1.2 WebApp] => service is running under 'webapp-server:webapp-server' (1), 792ms
2021/03/13 23:23:53 ✓ [1.2 WebApp] => app/service user has no password set (1), 142ms
2021/03/13 23:23:53 ✓ [1.2 WebApp] => playbook has no hardcoded 'webapp_user' (1), 21ms
2021/03/13 23:23:54 ✓ [1.2 WebApp] => playbook has no hardcoded 'webapp_group' (1), 22ms
2021/03/13 23:24:23 ✓ [1.2 WebApp] => can use 'webapp_user/webapp_group' variables (1), 29.758s
2021/03/13 23:24:52 ✓ [1.2 WebApp] => can install into different home dir (1), 28.425s
2021/03/13 23:24:52 ✓ [1.2 WebApp] => can use different source url (1), 16ms
2021/03/13 23:25:16 ✓ [1.2 WebApp] => can apply under non-root user (1), 24.052s
2021/03/13 23:25:16 ✓ [1.2 WebApp] => playbook has 'handlers' (1), 11ms
2021/03/13 23:25:17 -----------------------------------------------------------------------------------
2021/03/13 23:25:17 Tests Summary:
2021/03/13 23:25:17 20 (of 21) tests passed, 1 tests failed; rated as 96.30%
2021/03/13 23:25:17
2021/03/13 23:25:17 Time Spent: 7m49.251s
2021/03/13 23:25:17 -----------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment