first commit
0 parents
Showing
41 changed files
with
779 additions
and
0 deletions
.gitignore
0 → 100644
| 1 | resources/* |
ansible.cfg
0 → 100644
| 1 | [defaults] | ||
| 2 | inventory = inventories/test/hosts | ||
| 3 | remote_user = root | ||
| 4 | retry_file_enabled = false | ||
| 5 | module_name = shell | ||
| 6 | nocows = 1 | ||
| 7 | stdout_callback = debug | ||
| 8 | roles_path = roles | ||
| 9 | #log_path = log/ansible.log | ||
| 10 | #remote_tmp = /tmp/ | ||
| 11 | host_key_checking = false | ||
| 12 | #callback_whitelist = profile_tasks # ansible.log timestamp | ||
| 13 | #command_warnings = false | ||
| 14 | |||
| 15 | |||
| 16 | |||
| 17 | interpreter_python = /usr/bin/python3 | ||
| 18 | |||
| 19 | |||
| 20 | [privilege_escalation] | ||
| 21 | #become = true | ||
| 22 | #become_method = sudo | ||
| 23 | #become_user = root | ||
| 24 | #become_ask_pass=False |
files/jboss_version.fact
0 → 100644
install_custom_facts.yml
0 → 100644
| 1 | --- | ||
| 2 | - name: Custom facts for JBoss EAP version checking | ||
| 3 | hosts: all | ||
| 4 | become: true | ||
| 5 | tasks: | ||
| 6 | - name: create the custom facts directory | ||
| 7 | file: | ||
| 8 | path: /etc/ansible/facts.d | ||
| 9 | state: directory | ||
| 10 | |||
| 11 | - name: copy custom facts | ||
| 12 | copy: | ||
| 13 | src: files/jboss_version.fact | ||
| 14 | dest: /etc/ansible/facts.d | ||
| 15 | mode: "0777" |
inventories/produccion/hosts
0 → 100644
inventories/test/hosts
0 → 100644
jboss_patch_apply.yml
0 → 100644
| 1 | --- | ||
| 2 | - name: Apply JBoss Security Patch | ||
| 3 | hosts: all | ||
| 4 | become: true | ||
| 5 | roles: | ||
| 6 | - role: jboss_patch_apply | ||
| 7 | vars: | ||
| 8 | patch_version: "7.2.8" | ||
| 9 | patch_zip_location: "resources/" | ||
| 10 | patch_zip_file: "jboss-eap-7.2.8-patch.zip" | ||
| 11 | jboss_home_bin: "/opt/jboss-eap-7.2/bin/" | ||
| 12 | jboss_service_name: "jboss-eap" |
main.yml
0 → 100644
| 1 | --- | ||
| 2 | - name: Install JBoss EAP | ||
| 3 | hosts: all | ||
| 4 | become: true | ||
| 5 | roles: | ||
| 6 | - role: jboss | ||
| 7 | vars: | ||
| 8 | pkg_location: "resources/" | ||
| 9 | jboss_zip: "jboss-eap-7.2.0.zip" | ||
| 10 | system_user: "jboss" | ||
| 11 | install_location: "/opt/" | ||
| 12 | service_name: "jboss-eap" | ||
| 13 | jboss_admin_user: "admin" | ||
| 14 | jboss_admin_pass: "admin" | ||
| 15 | jboss_home: "/opt/jboss-eap-7.2/" | ||
| 16 | jboss_mode: "standalone" | ||
| 17 | jboss_host_config: "standalone.xml" | ||
| 18 | jboss_service_conf_home: "/opt/jboss-eap-7.2/bin/init.d/" | ||
| 19 | jboss_service_script: "jboss-eap-rhel.sh" | ||
| 20 | jboss_service_conf: "jboss-eap.conf" | ||
| 21 | java_version: "java-1.8.0-openjdk" | ||
| 22 | java_heap_xms: "12g" | ||
| 23 | java_heap_xmx: "12g" | ||
| 24 | java_metaspace_min: "1g" | ||
| 25 | java_metaspace_max: "1g" |
roles/jboss/.travis.yml
0 → 100644
| 1 | --- | ||
| 2 | language: python | ||
| 3 | python: "2.7" | ||
| 4 | |||
| 5 | # Use the new container infrastructure | ||
| 6 | sudo: false | ||
| 7 | |||
| 8 | # Install ansible | ||
| 9 | addons: | ||
| 10 | apt: | ||
| 11 | packages: | ||
| 12 | - python-pip | ||
| 13 | |||
| 14 | install: | ||
| 15 | # Install ansible | ||
| 16 | - pip install ansible | ||
| 17 | |||
| 18 | # Check ansible version | ||
| 19 | - ansible --version | ||
| 20 | |||
| 21 | # Create ansible.cfg with correct roles_path | ||
| 22 | - printf '[defaults]\nroles_path=../' >ansible.cfg | ||
| 23 | |||
| 24 | script: | ||
| 25 | # Basic role syntax check | ||
| 26 | - ansible-playbook tests/test.yml -i tests/inventory --syntax-check | ||
| 27 | |||
| 28 | notifications: | ||
| 29 | webhooks: https://galaxy.ansible.com/api/v1/notifications/ | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
roles/jboss/README.md
0 → 100644
| 1 | Role Name | ||
| 2 | ========= | ||
| 3 | |||
| 4 | A brief description of the role goes here. | ||
| 5 | |||
| 6 | Requirements | ||
| 7 | ------------ | ||
| 8 | |||
| 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. | ||
| 10 | |||
| 11 | Role Variables | ||
| 12 | -------------- | ||
| 13 | |||
| 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. | ||
| 15 | |||
| 16 | Dependencies | ||
| 17 | ------------ | ||
| 18 | |||
| 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. | ||
| 20 | |||
| 21 | Example Playbook | ||
| 22 | ---------------- | ||
| 23 | |||
| 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: | ||
| 25 | |||
| 26 | - hosts: servers | ||
| 27 | roles: | ||
| 28 | - { role: username.rolename, x: 42 } | ||
| 29 | |||
| 30 | License | ||
| 31 | ------- | ||
| 32 | |||
| 33 | BSD | ||
| 34 | |||
| 35 | Author Information | ||
| 36 | ------------------ | ||
| 37 | |||
| 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). |
roles/jboss/defaults/main.yml
0 → 100644
| 1 | --- | ||
| 2 | # defaults file for Jboss | ||
| 3 | jboss_zip: "jboss-eap-7.3.0.zip" | ||
| 4 | system_user: "jboss" | ||
| 5 | install_location: "/opt/" | ||
| 6 | service_name: "jboss-eap" | ||
| 7 | jboss_admin_user: "admin" | ||
| 8 | jboss_admin_pass: "admin" | ||
| 9 | jboss_home: "jboss-eap-7.3.0.zip" | ||
| 10 | jboss_host_config: "standalone-ha.xml" | ||
| 11 | jboss_mode: "standalone" | ||
| 12 | jboss_service_conf_home: "/opt/jboss-eap-7.3/bin/init.d/" | ||
| 13 | jboss_service_script: "jboss-eap-rhel.sh" | ||
| 14 | jboss_service_conf: "jboss-eap.conf" | ||
| 15 | java_version: "java-11-openjdk" | ||
| 16 | java_heap_xms: "1g" | ||
| 17 | java_heap_xmx: "1g" | ||
| 18 | java_metaspace_min: "96m" | ||
| 19 | java_metaspace_max: "256m" | ||
| 20 | jboss_firewall: | ||
| 21 | - {port: '9990/tcp', state: 'enabled'} | ||
| 22 | - {port: '8080/tcp', state: 'enabled'} | ||
| 23 | - {port: '8443/tcp', state: 'enabled'} | ||
| 24 | - {port: '8009/tcp', state: 'enabled'} # ajp | ||
| 25 | - {port: '8090/tcp', state: 'enabled'} # modcluster mcmp | ||
| 26 | - {port: '55200/udp', state: 'enabled'} # jgroups | ||
| 27 | - {port: '54200/udp', state: 'enabled'} # jgroups | ||
| 28 | - {port: '45688/udp', state: 'enabled'} # jgroups multicast address | ||
| 29 | - {port: '23364/udp', state: 'enabled'} # mod_cluster | ||
| 30 | |||
| 31 | jboss_jdbc_drivers: | ||
| 32 | - {name: "ojdbc6.jar", location: "modules/com/oracle/main/"} | ||
| 33 | - {name: "postgresql-9.2-1000.jdbc4.jar", location: "modules/org/postgresql/main/"} | ||
| 34 | |||
| 35 | jboss_jdbc_module: | ||
| 36 | - {file: "oracle_module.xml", location: "modules/com/oracle/main/", name: "module.xml"} | ||
| 37 | - {file: "postgresql_module.xml", location: "modules/org/postgresql/main/", name: "module.xml"} | ||
| 38 | |||
| 39 | jboss_admin_users: # web console | ||
| 40 | - {user: "admin", password: "c06ba95adae374bc766be220fad6cc0a", state: 'present'} | ||
| 41 | - {user: "data", password: "f27fcf18e55bd68962f75e0c2633539a", state: 'present'} |
roles/jboss/files/01-max_buff_jboss.conf
0 → 100644
roles/jboss/files/oracle_module.xml
0 → 100644
roles/jboss/handlers/main.yml
0 → 100644
roles/jboss/meta/main.yml
0 → 100644
roles/jboss/tasks/firewall_config.yml
0 → 100644
| 1 | --- | ||
| 2 | # tasks file for jboss | ||
| 3 | |||
| 4 | - name: Start firewall | ||
| 5 | service: | ||
| 6 | name: firewalld | ||
| 7 | state: started | ||
| 8 | tags: | ||
| 9 | - firewall_start | ||
| 10 | - firewall_config_yml | ||
| 11 | |||
| 12 | - name: Configure firewall | ||
| 13 | firewalld: | ||
| 14 | port: "{{ item.port }}" | ||
| 15 | permanent: yes | ||
| 16 | immediate: yes | ||
| 17 | state: "{{ item.state }}" | ||
| 18 | loop: "{{ jboss_firewall }}" | ||
| 19 | tags: | ||
| 20 | - firewall_config | ||
| 21 | - firewall_config_yml |
roles/jboss/tasks/install.yml
0 → 100644
| 1 | --- | ||
| 2 | # tasks file for jboss | ||
| 3 | |||
| 4 | - name: Check that Java is present | ||
| 5 | yum: | ||
| 6 | name: "{{ java_version }}" | ||
| 7 | state: present | ||
| 8 | tags: | ||
| 9 | - java_install | ||
| 10 | - install_yml | ||
| 11 | |||
| 12 | - name: Add a System user that runs the JBoss process | ||
| 13 | user: | ||
| 14 | name: "{{ system_user }}" | ||
| 15 | state: present | ||
| 16 | system: yes | ||
| 17 | tags: | ||
| 18 | - add_system_user | ||
| 19 | - install_yml | ||
| 20 | |||
| 21 | - name: Copy the zip file to the remote server and unzip | ||
| 22 | unarchive: | ||
| 23 | src: "{{ pkg_location | default('files/') }}{{ jboss_zip }}" | ||
| 24 | dest: "{{ install_location }}" | ||
| 25 | owner: "{{ system_user }}" | ||
| 26 | group: "{{ system_user }}" | ||
| 27 | creates: "{{ install_location }}{{ jboss_zip[:-6] }}/" | ||
| 28 | tags: | ||
| 29 | - copy_installer_zip | ||
| 30 | - install_yml | ||
| 31 | |||
| 32 | - name: Copy the init script to /etc/init.d/ | ||
| 33 | copy: | ||
| 34 | src: "{{ jboss_service_conf_home }}{{ jboss_service_script }}" | ||
| 35 | dest: /etc/init.d/{{ service_name }} | ||
| 36 | mode: 0755 | ||
| 37 | remote_src: yes | ||
| 38 | tags: | ||
| 39 | - copy_init_script | ||
| 40 | - install_yml | ||
| 41 | |||
| 42 | - name: copy the JBoss service config to /etc/default/ | ||
| 43 | template: | ||
| 44 | src: templates/{{ jboss_service_conf }} | ||
| 45 | dest: /etc/default/ | ||
| 46 | owner: "{{ system_user }}" | ||
| 47 | group: "{{ system_user }}" | ||
| 48 | notify: restart jboss | ||
| 49 | tags: | ||
| 50 | - copy_service_config | ||
| 51 | - install_yml | ||
| 52 | |||
| 53 | - name: reload daemon | ||
| 54 | systemd: | ||
| 55 | daemon_reload: yes | ||
| 56 | tags: | ||
| 57 | - reload_daemon | ||
| 58 | - install_yml |
roles/jboss/tasks/jboss_xml_config.yml
0 → 100644
| 1 | --- | ||
| 2 | # tasks file for jboss | ||
| 3 | |||
| 4 | - name: Configuracion de usuarios de la consola web | ||
| 5 | template: | ||
| 6 | src: templates/mgmt-users.properties | ||
| 7 | dest: "{{ jboss_home }}{{ jboss_mode }}/configuration/" | ||
| 8 | owner: "{{ system_user }}" | ||
| 9 | group: "{{ system_user }}" | ||
| 10 | tags: | ||
| 11 | - add_admin_user | ||
| 12 | - jboss_xml_config_xml | ||
| 13 | |||
| 14 | # Este es el standanloneX.xml | ||
| 15 | - name: copy the default {{ jboss_mode }} xml config file | ||
| 16 | template: | ||
| 17 | src: templates/{{ jboss_host_config }} | ||
| 18 | dest: "{{ jboss_home }}{{ jboss_mode }}/configuration/{{ jboss_host_config }}" | ||
| 19 | owner: "{{ system_user }}" | ||
| 20 | group: "{{ system_user }}" | ||
| 21 | notify: restart jboss | ||
| 22 | tags: | ||
| 23 | - copy_host_xmlconfig | ||
| 24 | - jboss_xml_config_yml | ||
| 25 | |||
| 26 | # Aca se encuentran las configuracion de java opts | ||
| 27 | - name: copy the default {{ jboss_mode }}.conf | ||
| 28 | template: | ||
| 29 | src: templates/{{ jboss_mode }}.conf | ||
| 30 | dest: "{{ jboss_home }}/bin/" | ||
| 31 | owner: "{{ system_user }}" | ||
| 32 | group: "{{ system_user }}" | ||
| 33 | notify: restart jboss | ||
| 34 | tags: | ||
| 35 | - copy_jboss_conf | ||
| 36 | - jboss_xml_config_yml |
roles/jboss/tasks/jdbc_driver_config.yml
0 → 100644
| 1 | --- | ||
| 2 | # tasks file for jboss | ||
| 3 | # datasources configs | ||
| 4 | - name: Create modules directory structure | ||
| 5 | file: | ||
| 6 | path: "{{ jboss_home }}{{ item.location }}" | ||
| 7 | state: directory | ||
| 8 | owner: "{{ system_user }}" | ||
| 9 | group: "{{ system_user }}" | ||
| 10 | loop: "{{ jboss_jdbc_module }}" | ||
| 11 | tags: | ||
| 12 | - create_module_structure | ||
| 13 | - jdbc_driver_config_yml | ||
| 14 | |||
| 15 | - name: copy the driver config xml config | ||
| 16 | copy: | ||
| 17 | src: templates/{{ item.file }} | ||
| 18 | dest: "{{ jboss_home }}/{{ item.location }}{{ item.name }}" | ||
| 19 | owner: "{{ system_user }}" | ||
| 20 | group: "{{ system_user }}" | ||
| 21 | mode: '0644' | ||
| 22 | #notify: restart jboss | ||
| 23 | loop: "{{ jboss_jdbc_module }}" | ||
| 24 | tags: | ||
| 25 | - copy_jdbc_driver_config | ||
| 26 | - jdbc_driver_config_yml | ||
| 27 | |||
| 28 | - name: copy the driver jar file | ||
| 29 | copy: | ||
| 30 | src: "{{ pkg_location | default('files/') }}{{ item.name }}" | ||
| 31 | dest: "{{ jboss_home }}/{{ item.location }}" | ||
| 32 | owner: "{{ system_user }}" | ||
| 33 | group: "{{ system_user }}" | ||
| 34 | mode: '0644' | ||
| 35 | #notify: restart jboss | ||
| 36 | loop: "{{ jboss_jdbc_drivers }}" | ||
| 37 | tags: | ||
| 38 | - copy_driver_jar | ||
| 39 | - jdbc_driver_config_yml |
roles/jboss/tasks/main.yml
0 → 100644
roles/jboss/templates/bk.standalone.xml
0 → 100644
This diff is collapsed.
Click to expand it.
roles/jboss/templates/jboss-eap.conf
0 → 100644
| 1 | # General configuration for the init.d scripts, | ||
| 2 | # not necessarily for JBoss EAP itself. | ||
| 3 | # default location: /etc/default/jboss-eap | ||
| 4 | |||
| 5 | ## Location of JDK | ||
| 6 | # JAVA_HOME="/usr/lib/jvm/default-java" | ||
| 7 | |||
| 8 | ## Location of JBoss EAP | ||
| 9 | # JBOSS_HOME="/opt/jboss-eap" | ||
| 10 | JBOSS_HOME={{ jboss_home | default('/opt/jboss-eap') }} | ||
| 11 | |||
| 12 | ## The username who should own the process. | ||
| 13 | # JBOSS_USER=jboss-eap | ||
| 14 | JBOSS_USER={{ system_user | default('jboss-eap') }} | ||
| 15 | |||
| 16 | ## The mode JBoss EAP should start, standalone or domain | ||
| 17 | # JBOSS_MODE=standalone | ||
| 18 | JBOSS_MODE={{ jboss_mode | default('standalone') }} | ||
| 19 | |||
| 20 | ## Configuration for standalone mode | ||
| 21 | # JBOSS_CONFIG=standalone.xml | ||
| 22 | JBOSS_CONFIG={{ jboss_host_config | default('standalone.xml') }} | ||
| 23 | |||
| 24 | ## Configuration for domain mode | ||
| 25 | # JBOSS_DOMAIN_CONFIG=domain.xml | ||
| 26 | # JBOSS_HOST_CONFIG=host-master.xml | ||
| 27 | |||
| 28 | ## The amount of time to wait for startup | ||
| 29 | # STARTUP_WAIT=60 | ||
| 30 | |||
| 31 | ## The amount of time to wait for shutdown | ||
| 32 | # SHUTDOWN_WAIT=60 | ||
| 33 | |||
| 34 | ## Location to keep the console log | ||
| 35 | # JBOSS_CONSOLE_LOG="/var/log/jboss-eap/console.log" | ||
| 36 | JBOSS_CONSOLE_LOG="/var/log/jboss-eap/console.log" | ||
| 37 | |||
| 38 | ## Additionals args to include in startup | ||
| 39 | # JBOSS_OPTS="--admin-only -b 127.0.0.1" | ||
| 40 | # original | ||
| 41 | #{% if inventory_hostname.startswith('p') %} | ||
| 42 | # JBOSS_OPTS="-Djboss.default.multicast.address=230.0.0.10 -Djboss.modcluster.multicast.address=224.0.1.106 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true" | ||
| 43 | #{% endif %} | ||
| 44 | |||
| 45 | #{% if inventory_hostname.startswith('t') %} | ||
| 46 | # JBOSS_OPTS="-Djboss.default.multicast.address=230.0.0.20 -Djboss.modcluster.multicast.address=224.0.1.107 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true" | ||
| 47 | #{% endif %} |
roles/jboss/templates/mgmt-users.properties
0 → 100644
| 1 | # | ||
| 2 | # Properties declaration of users for the realm 'ManagementRealm' which is the default realm | ||
| 3 | # for new installations. Further authentication mechanism can be configured | ||
| 4 | # as part of the <management /> in standalone.xml. | ||
| 5 | # | ||
| 6 | # Users can be added to this properties file at any time, updates after the server has started | ||
| 7 | # will be automatically detected. | ||
| 8 | # | ||
| 9 | # By default the properties realm expects the entries to be in the format: - | ||
| 10 | # username=HEX( MD5( username ':' realm ':' password)) | ||
| 11 | # | ||
| 12 | # A utility script is provided which can be executed from the bin folder to add the users: - | ||
| 13 | # - Linux | ||
| 14 | # bin/add-user.sh | ||
| 15 | # | ||
| 16 | # - Windows | ||
| 17 | # bin\add-user.bat | ||
| 18 | # | ||
| 19 | #$REALM_NAME=ManagementRealm$ This line is used by the add-user utility to identify the realm name already used in this file. | ||
| 20 | # | ||
| 21 | # On start-up the server will also automatically add a user $local - this user is specifically | ||
| 22 | # for local tools running against this AS installation. | ||
| 23 | # | ||
| 24 | # The following illustrates how an admin user could be defined, this | ||
| 25 | # is for illustration only and does not correspond to a usable password. | ||
| 26 | # | ||
| 27 | |||
| 28 | # Usuarios de Test | ||
| 29 | {% if inventory_hostname.startswith('t') %} | ||
| 30 | admin=c06ba95adae374bc766be220fad6cc0a | ||
| 31 | devcodium=dae58724eeb3a075ed0f1328baaf7412 | ||
| 32 | dtrevisan=4cfe1609b4f882d9d5df167201b5f8f3 | ||
| 33 | earce=eab2990cd53ae5660f68b8031a9087b2 | ||
| 34 | data=38d49bf344d1404f2b43a7981e888bfd | ||
| 35 | {% endif %} | ||
| 36 | |||
| 37 | |||
| 38 | # Usuarios de Produccion | ||
| 39 | {% if inventory_hostname.startswith('p') %} | ||
| 40 | admin=c06ba95adae374bc766be220fad6cc0a | ||
| 41 | devcodium=dae58724eeb3a075ed0f1328baaf7412 | ||
| 42 | dtrevisan=4cfe1609b4f882d9d5df167201b5f8f3 | ||
| 43 | earce=eab2990cd53ae5660f68b8031a9087b2 | ||
| 44 | data=38d49bf344d1404f2b43a7981e888bfd | ||
| 45 | {% endif %} |
roles/jboss/templates/new_standalone.xml
0 → 100755
This diff is collapsed.
Click to expand it.
roles/jboss/templates/oracle_module.xml
0 → 100644
roles/jboss/templates/postgresql_module.xml
0 → 100644
| 1 | <?xml version='1.0' encoding='UTF-8'?> | ||
| 2 | |||
| 3 | <module xmlns="urn:jboss:module:1.1" name="org.postgresql"> | ||
| 4 | |||
| 5 | <resources> | ||
| 6 | <resource-root path="postgresql-9.2-1000.jdbc4.jar"/> | ||
| 7 | </resources> | ||
| 8 | |||
| 9 | <dependencies> | ||
| 10 | <module name="javax.api"/> | ||
| 11 | <module name="javax.transaction.api"/> | ||
| 12 | </dependencies> | ||
| 13 | </module> |
roles/jboss/templates/standalone.conf
0 → 100644
| 1 | ## -*- shell-script -*- ###################################################### | ||
| 2 | ## ## | ||
| 3 | ## JBoss EAP Bootstrap Script Configuration ## | ||
| 4 | ## ## | ||
| 5 | ############################################################################## | ||
| 6 | |||
| 7 | # | ||
| 8 | # This file is optional; it may be removed if not needed. | ||
| 9 | # | ||
| 10 | |||
| 11 | # | ||
| 12 | # Specify the maximum file descriptor limit, use "max" or "maximum" to use | ||
| 13 | # the default, as queried by the system. | ||
| 14 | # | ||
| 15 | # Defaults to "maximum" | ||
| 16 | # | ||
| 17 | #MAX_FD="maximum" | ||
| 18 | |||
| 19 | # | ||
| 20 | # Specify the profiler configuration file to load. | ||
| 21 | # | ||
| 22 | # Default is to not load profiler configuration file. | ||
| 23 | # | ||
| 24 | #PROFILER="" | ||
| 25 | |||
| 26 | # | ||
| 27 | # Specify the location of the Java home directory. If set then $JAVA will | ||
| 28 | # be defined to $JAVA_HOME/bin/java, else $JAVA will be "java". | ||
| 29 | # | ||
| 30 | #JAVA_HOME="/opt/java/jdk" | ||
| 31 | |||
| 32 | # tell linux glibc how many memory pools can be created that are used by malloc | ||
| 33 | # MALLOC_ARENA_MAX="5" | ||
| 34 | |||
| 35 | # | ||
| 36 | # Specify the exact Java VM executable to use. | ||
| 37 | # | ||
| 38 | #JAVA="" | ||
| 39 | |||
| 40 | if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then | ||
| 41 | JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman" | ||
| 42 | fi | ||
| 43 | |||
| 44 | # Uncomment the following line to prevent manipulation of JVM options | ||
| 45 | # by shell scripts. | ||
| 46 | # | ||
| 47 | #PRESERVE_JAVA_OPTS=true | ||
| 48 | |||
| 49 | # | ||
| 50 | # Specify options to pass to the Java VM. | ||
| 51 | # | ||
| 52 | if [ "x$JAVA_OPTS" = "x" ]; then | ||
| 53 | JAVA_OPTS="-Xms{{ java_heap_xms | default('1303m') }} -Xmx{{ java_heap_xmx | default('1303m') }} -XX:MetaspaceSize={{ java_metaspace_min | default('96M') }} -XX:MaxMetaspaceSize={{ java_metaspace_max | default('256m') }} -Djava.net.preferIPv4Stack=true" | ||
| 54 | JAVA_OPTS="$JAVA_OPTS -server -XX:+DoEscapeAnalysis -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:MaxGCPauseMillis=500" | ||
| 55 | JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true" | ||
| 56 | else | ||
| 57 | echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS" | ||
| 58 | fi | ||
| 59 | |||
| 60 | # Sample JPDA settings for remote socket debugging | ||
| 61 | #JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n" | ||
| 62 | |||
| 63 | # Sample JPDA settings for shared memory debugging | ||
| 64 | #JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_shmem,server=y,suspend=n,address=jboss" | ||
| 65 | |||
| 66 | # Uncomment to not use JBoss Modules lockless mode | ||
| 67 | #JAVA_OPTS="$JAVA_OPTS -Djboss.modules.lockless=false" | ||
| 68 | |||
| 69 | # Uncomment to gather JBoss Modules metrics | ||
| 70 | #JAVA_OPTS="$JAVA_OPTS -Djboss.modules.metrics=true" | ||
| 71 | |||
| 72 | # Uncomment this to run with a security manager enabled | ||
| 73 | # SECMGR="true" | ||
| 74 | |||
| 75 | # Uncomment this in order to be able to run WildFly on FreeBSD | ||
| 76 | # when you get "epoll_create function not implemented" message in dmesg output | ||
| 77 | #JAVA_OPTS="$JAVA_OPTS -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider" | ||
| 78 | |||
| 79 | # enable garbage collection logging if not set in environment differently | ||
| 80 | if [ "x$GC_LOG" = "x" ]; then | ||
| 81 | GC_LOG="true" | ||
| 82 | else | ||
| 83 | echo "GC_LOG set in environment to $GC_LOG" | ||
| 84 | fi | ||
| 85 |
roles/jboss/templates/standalone.xml
0 → 100644
This diff is collapsed.
Click to expand it.
roles/jboss/tests/inventory
0 → 100644
roles/jboss/tests/test.yml
0 → 100644
roles/jboss/vars/main.yml
0 → 100644
roles/jboss_patch_apply/.travis.yml
0 → 100644
| 1 | --- | ||
| 2 | language: python | ||
| 3 | python: "2.7" | ||
| 4 | |||
| 5 | # Use the new container infrastructure | ||
| 6 | sudo: false | ||
| 7 | |||
| 8 | # Install ansible | ||
| 9 | addons: | ||
| 10 | apt: | ||
| 11 | packages: | ||
| 12 | - python-pip | ||
| 13 | |||
| 14 | install: | ||
| 15 | # Install ansible | ||
| 16 | - pip install ansible | ||
| 17 | |||
| 18 | # Check ansible version | ||
| 19 | - ansible --version | ||
| 20 | |||
| 21 | # Create ansible.cfg with correct roles_path | ||
| 22 | - printf '[defaults]\nroles_path=../' >ansible.cfg | ||
| 23 | |||
| 24 | script: | ||
| 25 | # Basic role syntax check | ||
| 26 | - ansible-playbook tests/test.yml -i tests/inventory --syntax-check | ||
| 27 | |||
| 28 | notifications: | ||
| 29 | webhooks: https://galaxy.ansible.com/api/v1/notifications/ | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
roles/jboss_patch_apply/README.md
0 → 100644
| 1 | Role Name | ||
| 2 | ========= | ||
| 3 | |||
| 4 | A brief description of the role goes here. | ||
| 5 | |||
| 6 | Requirements | ||
| 7 | ------------ | ||
| 8 | |||
| 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. | ||
| 10 | |||
| 11 | Role Variables | ||
| 12 | -------------- | ||
| 13 | |||
| 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. | ||
| 15 | |||
| 16 | Dependencies | ||
| 17 | ------------ | ||
| 18 | |||
| 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. | ||
| 20 | |||
| 21 | Example Playbook | ||
| 22 | ---------------- | ||
| 23 | |||
| 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: | ||
| 25 | |||
| 26 | - hosts: servers | ||
| 27 | roles: | ||
| 28 | - { role: username.rolename, x: 42 } | ||
| 29 | |||
| 30 | License | ||
| 31 | ------- | ||
| 32 | |||
| 33 | BSD | ||
| 34 | |||
| 35 | Author Information | ||
| 36 | ------------------ | ||
| 37 | |||
| 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). |
roles/jboss_patch_apply/defaults/main.yml
0 → 100644
roles/jboss_patch_apply/handlers/main.yml
0 → 100644
roles/jboss_patch_apply/meta/main.yml
0 → 100644
| 1 | galaxy_info: | ||
| 2 | author: your name | ||
| 3 | description: your role description | ||
| 4 | company: your company (optional) | ||
| 5 | |||
| 6 | # If the issue tracker for your role is not on github, uncomment the | ||
| 7 | # next line and provide a value | ||
| 8 | # issue_tracker_url: http://example.com/issue/tracker | ||
| 9 | |||
| 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: | ||
| 11 | # - BSD-3-Clause (default) | ||
| 12 | # - MIT | ||
| 13 | # - GPL-2.0-or-later | ||
| 14 | # - GPL-3.0-only | ||
| 15 | # - Apache-2.0 | ||
| 16 | # - CC-BY-4.0 | ||
| 17 | license: license (GPL-2.0-or-later, MIT, etc) | ||
| 18 | |||
| 19 | min_ansible_version: 2.9 | ||
| 20 | |||
| 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. | ||
| 22 | # min_ansible_container_version: | ||
| 23 | |||
| 24 | # | ||
| 25 | # Provide a list of supported platforms, and for each platform a list of versions. | ||
| 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. | ||
| 27 | # To view available platforms and versions (or releases), visit: | ||
| 28 | # https://galaxy.ansible.com/api/v1/platforms/ | ||
| 29 | # | ||
| 30 | # platforms: | ||
| 31 | # - name: Fedora | ||
| 32 | # versions: | ||
| 33 | # - all | ||
| 34 | # - 25 | ||
| 35 | # - name: SomePlatform | ||
| 36 | # versions: | ||
| 37 | # - all | ||
| 38 | # - 1.0 | ||
| 39 | # - 7 | ||
| 40 | # - 99.99 | ||
| 41 | |||
| 42 | galaxy_tags: [] | ||
| 43 | # List tags for your role here, one per line. A tag is a keyword that describes | ||
| 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to | ||
| 45 | # remove the '[]' above, if you add tags to this list. | ||
| 46 | # | ||
| 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. | ||
| 48 | # Maximum 20 tags per role. | ||
| 49 | |||
| 50 | dependencies: [] | ||
| 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, | ||
| 52 | # if you add dependencies to this list. | ||
| 53 | |||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | - name: copy the zip file | ||
| 2 | copy: | ||
| 3 | src: "{{ patch_zip_location }}{{ patch_zip_file }}" | ||
| 4 | dest: /root/ | ||
| 5 | |||
| 6 | - name: apply the patch | ||
| 7 | shell: './jboss-cli.sh --command="patch apply /root/{{ patch_zip_file }}"' | ||
| 8 | args: | ||
| 9 | chdir: "{{ jboss_home_bin }}" | ||
| 10 | |||
| 11 | - name: restart jboss | ||
| 12 | service: | ||
| 13 | name: "{{ jboss_service_name }}" | ||
| 14 | state: restarted |
roles/jboss_patch_apply/tasks/main.yml
0 → 100644
roles/jboss_patch_apply/tests/inventory
0 → 100644
roles/jboss_patch_apply/tests/test.yml
0 → 100644
roles/jboss_patch_apply/vars/main.yml
0 → 100644
-
Please register or sign in to post a comment