Skip to content

Commit

Permalink
fix(ansible): move env to inventory
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
  • Loading branch information
glimchb committed Jun 4, 2024
1 parent 08bc8e0 commit 2a39c64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ansible/inventory
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dh4bmc ansible_host=172.22.2.4 ansible_connection=local ansible_user=root
amd ansible_host=172.22.3.1 ansible_connection=ssh ansible_user=root
bf2 ansible_host=172.22.3.2 ansible_connection=ssh ansible_user=root
mrv ansible_host=172.22.3.3 ansible_connection=ssh ansible_user=root
mev ansible_host=192.168.0.2 ansible_connection=ssh ansible_user=root ansible_ssh_common_args='-J root@172.22.4.4'
mev ansible_host=192.168.0.2 ansible_connection=ssh ansible_user=root ansible_ssh_common_args='-J root@172.22.4.4' proxy_env="{'http_proxy': 'http://192.168.0.1:3128', 'https_proxy': 'http://192.168.0.1:3128'}"

[dpubmcs]
bf2bmc ansible_host=172.22.4.2 ansible_connection=local ansible_user=root
Expand Down
8 changes: 2 additions & 6 deletions ansible/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@
- name: Install docker and other packages
hosts: hostservers,tgens,DPUs,Management
become: yes
environment:
http_proxy: "{{ 'http://192.168.0.1:3128' if inventory_hostname == 'mev' else '' }}"
https_proxy: "{{ 'http://192.168.0.1:3128' if inventory_hostname == 'mev' else '' }}"
environment: "{{ proxy_env | default({}) }}"
tasks:
- ansible.builtin.package: state=present name=python3-pip,sshpass,git
- when: ansible_os_family == 'Debian'
Expand Down Expand Up @@ -137,9 +135,7 @@

- name: Intel | telegraf otel monitoring
when: inventory_hostname == 'mev'
environment:
http_proxy: http://192.168.0.1:3128
https_proxy: http://192.168.0.1:3128
environment: "{{ proxy_env | default({}) }}"
block:
- name: Intel | Downgrade requests package due to bug https://github.com/ansible-collections/community.docker/issues/868
ansible.builtin.pip: name=requests<2.32
Expand Down

0 comments on commit 2a39c64

Please sign in to comment.