Merge "Unify extra package download with other OSA roles"
This commit is contained in:
commit
5ef70192df
@ -68,7 +68,16 @@ haproxy_ssl_self_signed_subject: "/C=US/ST=Texas/L=San Antonio/O=IT/CN={{ extern
|
|||||||
haproxy_ssl_cipher_suite: "{{ ssl_cipher_suite | default('ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS') }}"
|
haproxy_ssl_cipher_suite: "{{ ssl_cipher_suite | default('ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS') }}"
|
||||||
haproxy_ssl_bind_options: "no-sslv3"
|
haproxy_ssl_bind_options: "no-sslv3"
|
||||||
|
|
||||||
|
# hatop extra package URL and checksum
|
||||||
haproxy_hatop_download_url: "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hatop/hatop-0.7.7.tar.gz"
|
haproxy_hatop_download_url: "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hatop/hatop-0.7.7.tar.gz"
|
||||||
|
haproxy_hatop_download_checksum: "sha256:0b9fc1b84ce4e469a069e3a3c7c1b5eea10e6bb24bc66bd32af453acd54636ab"
|
||||||
|
|
||||||
|
# Where the extra package download is executed from.
|
||||||
|
# Options are ['deployment-host', 'target-host']
|
||||||
|
haproxy_hatop_downloader: "deployment-host"
|
||||||
|
|
||||||
|
# The location where the extra packages are downloaded to
|
||||||
|
haproxy_hatop_download_path: "/opt/cache/files"
|
||||||
|
|
||||||
## haproxy default
|
## haproxy default
|
||||||
# Set the number of retries to perform on a server after a connection failure
|
# Set the number of retries to perform on a server after a connection failure
|
||||||
|
@ -24,25 +24,27 @@
|
|||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
|
|
||||||
- name: Download HATop
|
- name: Ensure haproxy_hatop_download_path exists
|
||||||
local_action:
|
|
||||||
module: get_url
|
|
||||||
url: "{{ haproxy_hatop_download_url }}"
|
|
||||||
dest: "/tmp/{{ haproxy_hatop_download_url | basename }}"
|
|
||||||
force: yes
|
|
||||||
validate_certs: "{{ haproxy_hatop_download_validate_certs }}"
|
|
||||||
run_once: True
|
|
||||||
vars:
|
|
||||||
ansible_python_interpreter: "/usr/bin/python"
|
|
||||||
|
|
||||||
- name: Create HATop directory
|
|
||||||
file:
|
file:
|
||||||
path: "/opt/{{ haproxy_hatop_download_url | basename | replace('.tar.gz', '') }}"
|
path: "{{ haproxy_hatop_download_path }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
delegate_to: "{{ (haproxy_hatop_downloader == 'deployment-host') | ternary('localhost', omit) }}"
|
||||||
|
|
||||||
|
- name: Download extra package
|
||||||
|
get_url:
|
||||||
|
url: "{{ haproxy_hatop_download_url }}"
|
||||||
|
dest: "{{ haproxy_hatop_download_path }}"
|
||||||
|
validate_certs: "{{ haproxy_hatop_download_validate_certs }}"
|
||||||
|
register: fetch_url
|
||||||
|
until: fetch_url | success
|
||||||
|
retries: 3
|
||||||
|
delay: 10
|
||||||
|
delegate_to: "{{ (haproxy_hatop_downloader == 'deployment-host') | ternary('localhost', omit) }}"
|
||||||
|
|
||||||
- name: Unarchive HATop
|
- name: Unarchive HATop
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "/tmp/{{ haproxy_hatop_download_url | basename }}"
|
src: "{{ haproxy_hatop_download_path }}/{{ haproxy_hatop_download_url | basename }}"
|
||||||
|
remote_src: "{{ (haproxy_hatop_downloader == 'deployment-host') | ternary('no', 'yes') }}"
|
||||||
dest: "/opt"
|
dest: "/opt"
|
||||||
|
|
||||||
- name: Install HATop
|
- name: Install HATop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user