Merge remote-tracking branch 'origin/master'
# Conflicts:
# tasks/main.yml
# tasks/with_no_proxy.yml
# tasks/with_proxy.yml
diff --git a/defaults/main.yml b/defaults/main.yml
index 2910349..05ad7b4 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -5,15 +5,33 @@
# Default value to limit swap file use
vm_swappiness: 60
-# Default epel repo for OracleLinux 6
-epel_rhel6: http://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
-
-# Default epel repo for RHEL 7
-epel_rhel7: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
-
-# Default epel repo for RHEL 6
-#epel_rhel6: https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
-
qpid_client: ftp://fr2.rpmfind.net/linux/epel/7/x86_64/q/qpid-cpp-client-1.35.0-3.el7.x86_64.rpm
-
qpid_server: ftp://fr2.rpmfind.net/linux/epel/7/x86_64/q/qpid-cpp-server-1.35.0-3.el7.x86_64.rpm
+
+pip_packages:
+- httplib2
+- pexpect
+- passlib
+- requests
+- kazoo
+
+yum_os_minimum_packages:
+- bind-utils
+- chkconfig
+- curl
+- tar
+- wget
+- yum-utils
+- unzip
+- rsync
+- which
+- libselinux-python
+- nss
+- openssh-clients
+- openssh-server
+- grep
+- rpm
+- rng-tools
+- sed
+- unzip
+
diff --git a/tasks/with_proxy.yml b/tasks/with_proxy.yml
index 39ae42f..00dff9f 100644
--- a/tasks/with_proxy.yml
+++ b/tasks/with_proxy.yml
@@ -1,33 +1,25 @@
---
-- name: Update basic yum os packages
+- 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:
- - bind-utils
- - chkconfig
- - curl
- - tar
- - wget
- - yum-utils
- - unzip
- - rsync
- - which
- - libselinux-python
- - nss
- - openssh-clients
- - openssh-server
- - grep
- - rpm
- - rng-tools
- - sed
- - unzip
+ with_items: "{{ yum_os_minimum_packages }}"
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"
-- name: Download pip package manager
+- name: Download pip package manager with proxy
become: yes
tags: ['pip-manager']
get_url:
@@ -37,8 +29,9 @@
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"
-- name: Install pip package manager
+- name: Install pip package manager with proxy
become: yes
tags: ['pip-manager']
shell: python /tmp/get-pip.py
@@ -46,18 +39,25 @@
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"
-- name: Update python packages
+- name: Update pip
+ become: yes
+ pip:
+ name: pip
+ state: latest
+ environment:
+ http_proxy: "{{ http_proxy }}"
+ https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"
+
+- name: Update python packages with no proxy
become: yes
pip:
name: '{{ item }}'
state: present
- with_items:
- - httplib2
- - pexpect
- - passlib
- - requests
- - kazoo
+ with_items: "{{ pip_packages }}"
environment:
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
+ no_proxy: "{{ no_proxy }}"