| --- |
| #- name: Update EPEL with proxy |
| # yum: |
| # name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm" |
| # state: present |
| # environment: |
| # http_proxy: "{{ http_proxy }}" |
| # https_proxy: "{{ https_proxy }}" |
| # no_proxy: "{{ no_proxy }}" |
| # when: epel_repo is not defined and epel_repo | trim != '' |
| |
| #- name: Update EPEL from custom location with proxy |
| # yum: |
| # name: "{{ epel_repo }}" |
| # state: present |
| # environment: |
| # http_proxy: "{{ http_proxy }}" |
| # https_proxy: "{{ https_proxy }}" |
| # no_proxy: "{{ no_proxy }}" |
| # when: epel_repo is defined and epel_repo | trim != '' |
| |
| - name: Yum update with proxy |
| yum: |
| name: '*' |
| state: latest |
| environment: |
| http_proxy: "{{ http_proxy }}" |
| https_proxy: "{{ https_proxy }}" |
| no_proxy: "{{ no_proxy }}" |
| |
| - name: Update basic yum os packages with proxy |
| become: yes |
| yum: |
| name: "{{ item }}" |
| state: present |
| with_items: "{{ yum_os_minimum_packages }}" |
| environment: |
| http_proxy: "{{ http_proxy }}" |
| https_proxy: "{{ https_proxy }}" |
| |
| - name: Download pip package manager |
| become: yes |
| tags: ['pip-manager'] |
| get_url: |
| url: https://bootstrap.pypa.io/get-pip.py |
| dest: /tmp/get-pip.py |
| when: pip_conf_dir is not defined |
| environment: |
| http_proxy: "{{ http_proxy }}" |
| https_proxy: "{{ https_proxy }}" |
| |
| - name: Install pip package manager |
| become: yes |
| tags: ['pip-manager'] |
| shell: python /tmp/get-pip.py |
| when: pip_conf_dir is not defined |
| environment: |
| http_proxy: "{{ http_proxy }}" |
| https_proxy: "{{ https_proxy }}" |
| |