Skip to content

Commit

Permalink
simplify our tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kayiwa committed Jan 19, 2024
1 parent d2d1221 commit f216f98
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 35 deletions.
21 changes: 0 additions & 21 deletions roles/byzantine/molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,6 @@
register: present
failed_when:
- present is changed
- name: test for presence byzantine apache config
lineinfile:
path: "/etc/apache2/sites-available/000-default.conf"
line: "{{ item }}"
state: present
loop:
- "Alias /byzantine /var/www/byzantine/current"
check_mode: true
register: present
failed_when:
- name: test for presence byzantine php ini
lineinfile:
path: "/etc/apache2/sites-available/000-default.conf"
line: "{{ item }}"
state: present
loop:
- "upload_max_filesize = 8M"
- "memory_limit = 256M"
check_mode: true
register: present
failed_when:
- name: test for byzantine conf files existence
stat:
path: "{{ item }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/tomcat9/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Example Playbook

- hosts: servers
roles:
- { role: roles/tomcat8 }
- { role: roles/tomcat9 }

14 changes: 7 additions & 7 deletions roles/tomcat9/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
# defaults file for roles/tomcat8
tomcat8_enabled: true
tomcat8_hostname: localhost
tomcat8_server_port: 8005
tomcat8_catalina_port: 8983
tomcat8_catalina_redirect_port: 8443
tomcat_shutdown_port: "{{ tomcat8_server_port }}"
# defaults file for roles/tomcat9
tomcat9_enabled: true
tomcat9_hostname: localhost
tomcat9_server_port: 8005
tomcat9_catalina_port: 8983
tomcat9_catalina_redirect_port: 8443
tomcat_shutdown_port: "{{ tomcat9_server_port }}"
tomcat_port: 8080
tomcat_connection_timeout: 20000
tomcat_redirect_port: "{{ tomcat8_catalina_redirect_port }}"
Expand Down
4 changes: 2 additions & 2 deletions roles/tomcat9/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# handlers file for roles/tomcat8
# handlers file for roles/tomcat9
- name: restart tomcat
ansible.builtin.service:
name: tomcat8
name: tomcat9
state: restarted
become: true
2 changes: 1 addition & 1 deletion roles/tomcat9/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
galaxy_info:
role_name: tomcat8
role_name: tomcat9
company: Princeton University Library
description: Tomcat8 Role
author: pulibrary
Expand Down
4 changes: 2 additions & 2 deletions roles/tomcat9/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
update_cache: true
cache_valid_time: 600
tasks:
- name: "Include tomcat8"
- name: "Include tomcat9"
ansible.builtin.include_role:
name: tomcat8
name: tomcat9
2 changes: 1 addition & 1 deletion roles/tomcat9/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
# vars file for roles/tomcat8
# vars file for roles/tomcat9

0 comments on commit f216f98

Please sign in to comment.