Updated docs
diff --git a/README.md b/README.md
index 910cf93..b8c221e 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,26 @@
-Role Name
+Apigee OPDK Stop Components
=========
-A brief description of the role goes here.
+This repository contains an Ansible role that stops either all components or the indicated one.
Requirements
------------
-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.
+None
Role Variables
--------------
-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.
+
+| Variable Name | Description |
+| --- | --- |
+| component_name | Name of the component to start; if set to all then apigee-all is used. |
+| http_proxy | http proxy endpoint |
+| https_proxy | https proxy endpoint |
+| no_proxy | no proxy to be set when working with a proxy |
+| port_timeout | Update the port timeout setting in the Apigee update script |
+| up_timeout | Update the setting in the Apigee update script waiting for the component to come up |
+| opdk_debug_mode | If set to `on` then the bash script will be run with the `-x` parameter |
Dependencies
------------
@@ -21,21 +30,20 @@
Example Playbook
----------------
-Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
-
- hosts: servers
roles:
- - { role: username.rolename, x: 42 }
+ - { role: apigee-opdk-stop-components }
License
-------
-BSD
+Apache 2.0
Author Information
------------------
-An optional section for the role authors to include contact information, or a website (HTML is not allowed).
+Carlos Frias
+
<!-- BEGIN Google Required Disclaimer -->
# Not Google Product Clause
diff --git a/tasks/main.yml b/tasks/main.yml
index 358070d..76be42f 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -3,12 +3,24 @@
- block:
- name: Stop all Apigee components on the node
ignore_errors: yes
- shell: '{{ apigee_all }} stop'
+ shell: '/opt/apigee/apigee-service/bin/apigee-all stop'
+ environment:
+ http_proxy: "{{ http_proxy }}"
+ https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"
+ PORT_TIMEOUT: '{{ port_timeout | default(60) }}'
+ UP_TIMEOUT: '{{ up_timeout | default(60) }}'
when: opdk_version | version_compare('4.16.01', '>=') and opdk_debug_mode is not defined or opdk_debug_mode | trim | lower == 'off'
- name: DEBUG_MODE - Stop all Apigee components on the node
ignore_errors: yes
- shell: '{{ apigee_all }} stop'
+ shell: 'bash -x /opt/apigee/apigee-service/bin/apigee-all stop'
+ environment:
+ http_proxy: "{{ http_proxy }}"
+ https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"
+ PORT_TIMEOUT: '{{ port_timeout | default(60) }}'
+ UP_TIMEOUT: '{{ up_timeout | default(60) }}'
when: opdk_version | version_compare('4.16.01', '>=') and opdk_debug_mode is defined and opdk_debug_mode | trim | lower == 'on'
when: component_name == 'all'
@@ -17,11 +29,23 @@
- name: Stop a specific Apigee component on the node
ignore_errors: yes
shell: '/opt/apigee/apigee-service/bin/apigee-service {{ component_name }} stop'
+ environment:
+ http_proxy: "{{ http_proxy }}"
+ https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"
+ PORT_TIMEOUT: '{{ port_timeout | default(60) }}'
+ UP_TIMEOUT: '{{ up_timeout | default(60) }}'
when: opdk_version | version_compare('4.16.01', '>=') and opdk_debug_mode is not defined or opdk_debug_mode | trim | lower == 'off'
- name: DEBUG_MODE - Stop a specific Apigee component on the node
ignore_errors: yes
- shell: '/opt/apigee/apigee-service/bin/apigee-service {{ component_name }} stop'
+ shell: 'bash -x /opt/apigee/apigee-service/bin/apigee-service {{ component_name }} stop'
+ environment:
+ http_proxy: "{{ http_proxy }}"
+ https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"
+ PORT_TIMEOUT: '{{ port_timeout | default(60) }}'
+ UP_TIMEOUT: '{{ up_timeout | default(60) }}'
when: opdk_version | version_compare('4.16.01', '>=') and opdk_debug_mode is defined and opdk_debug_mode | trim | lower == 'on'
when: component_name != 'all'