mirror of
https://gitea.0xace.cc/ansible-galaxy/consul.git
synced 2025-04-05 21:51:57 +00:00
Add http and https proxy support
This commit is contained in:
parent
9e46c26746
commit
45d907e336
@ -3,12 +3,18 @@
|
|||||||
name: gpg
|
name: gpg
|
||||||
|
|
||||||
- name: Add gpg keys for consul
|
- name: Add gpg keys for consul
|
||||||
|
environment:
|
||||||
|
http_proxy: "{{ consul_install_http_proxy | default(omit) }}"
|
||||||
|
https_proxy: "{{ consul_install_https_proxy | default(omit) }}"
|
||||||
ansible.builtin.apt_key:
|
ansible.builtin.apt_key:
|
||||||
url: "{{ item.url }}"
|
url: "{{ item.url }}"
|
||||||
keyring: "{{ item.keyring }}"
|
keyring: "{{ item.keyring }}"
|
||||||
loop: "{{ consul_apt_key }}"
|
loop: "{{ consul_apt_key }}"
|
||||||
|
|
||||||
- name: Add Hashicorp repository
|
- name: Add Hashicorp repository
|
||||||
|
environment:
|
||||||
|
http_proxy: "{{ consul_install_http_proxy | default(omit) }}"
|
||||||
|
https_proxy: "{{ consul_install_https_proxy | default(omit) }}"
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: "{{ item.repo }}"
|
repo: "{{ item.repo }}"
|
||||||
state: present
|
state: present
|
||||||
@ -25,10 +31,6 @@
|
|||||||
consul_installed_package: "{{ ansible_facts.packages[consul_package_name][0]['name'] }}"
|
consul_installed_package: "{{ ansible_facts.packages[consul_package_name][0]['name'] }}"
|
||||||
when: consul_package_name in ansible_facts.packages
|
when: consul_package_name in ansible_facts.packages
|
||||||
|
|
||||||
- debug:
|
|
||||||
msg: "{{ ansible_facts.packages[consul_package_name][0]['version'] }}"
|
|
||||||
when: consul_installed_package is defined
|
|
||||||
|
|
||||||
- name: Mask Consul before install
|
- name: Mask Consul before install
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: "{{ consul_package_name }}"
|
name: "{{ consul_package_name }}"
|
||||||
@ -36,6 +38,9 @@
|
|||||||
when: consul_package_name not in ansible_facts.packages or ansible_facts.packages[consul_package_name][0]['version'] != (consul_version + "-" + consul_version_build)
|
when: consul_package_name not in ansible_facts.packages or ansible_facts.packages[consul_package_name][0]['version'] != (consul_version + "-" + consul_version_build)
|
||||||
|
|
||||||
- name: "Install {{ consul_package_name }}-{{ consul_version }}-{{ consul_version_build }}"
|
- name: "Install {{ consul_package_name }}-{{ consul_version }}-{{ consul_version_build }}"
|
||||||
|
environment:
|
||||||
|
http_proxy: "{{ consul_install_http_proxy | default(omit) }}"
|
||||||
|
https_proxy: "{{ consul_install_https_proxy | default(omit) }}"
|
||||||
apt:
|
apt:
|
||||||
name: "{{ consul_package }}-{{ consul_version_build }}"
|
name: "{{ consul_package }}-{{ consul_version_build }}"
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
@ -43,6 +48,9 @@
|
|||||||
when: consul_package_name not in ansible_facts.packages
|
when: consul_package_name not in ansible_facts.packages
|
||||||
|
|
||||||
- name: "Update {{ consul_package_name }}-{{ consul_version }}-{{ consul_version_build }}"
|
- name: "Update {{ consul_package_name }}-{{ consul_version }}-{{ consul_version_build }}"
|
||||||
|
environment:
|
||||||
|
http_proxy: "{{ consul_install_http_proxy | default(omit) }}"
|
||||||
|
https_proxy: "{{ consul_install_https_proxy | default(omit) }}"
|
||||||
apt:
|
apt:
|
||||||
name: "{{ consul_package }}-{{ consul_version_build }}"
|
name: "{{ consul_package }}-{{ consul_version_build }}"
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
when: consul_install_repo
|
when: consul_install_repo
|
||||||
|
|
||||||
- name: "Install {{ consul_package_name }}-{{ consul_version }} from official repository"
|
- name: "Install {{ consul_package_name }}-{{ consul_version }} from official repository"
|
||||||
|
environment:
|
||||||
|
http_proxy: "{{ consul_install_http_proxy | default(omit) }}"
|
||||||
|
https_proxy: "{{ consul_install_https_proxy | default(omit) }}"
|
||||||
dnf:
|
dnf:
|
||||||
name: "{{ consul_package }}"
|
name: "{{ consul_package }}"
|
||||||
state: present
|
state: present
|
||||||
@ -21,6 +24,9 @@
|
|||||||
when: consul_install_repo
|
when: consul_install_repo
|
||||||
|
|
||||||
- name: "Install {{ consul_package_name }}-{{ consul_version }}"
|
- name: "Install {{ consul_package_name }}-{{ consul_version }}"
|
||||||
|
environment:
|
||||||
|
http_proxy: "{{ consul_install_http_proxy | default(omit) }}"
|
||||||
|
https_proxy: "{{ consul_install_https_proxy | default(omit) }}"
|
||||||
dnf:
|
dnf:
|
||||||
name: "{{ consul_package }}"
|
name: "{{ consul_package }}"
|
||||||
state: present
|
state: present
|
||||||
|
Loading…
x
Reference in New Issue
Block a user