Skip to content

Commit

Permalink
Added support of CentOS 7.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
gelin committed Oct 3, 2016
1 parent 31b5080 commit b8ab74b
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 18 deletions.
3 changes: 3 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ galaxy_info:
- name: Debian
versions:
- jessie
- name: CentOS
versions:
- 7.2

galaxy_tags:
- networking
Expand Down
32 changes: 14 additions & 18 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,20 @@
- apt: update_cache=yes cache_valid_time=3600
become: yes
tags: install

- name: Install depends
package: name={{ item }} state=present
become: yes
with_items:
- python
- python-dev
- python-virtualenv
- gcc
- dialog
- libaugeas0
- libssl-dev
- libffi-dev
- ca-certificates
- python-pip
- git
tags: install
when: ansible_os_family == "Debian"

- include_vars: "{{ item }}"
with_first_found:
- "../vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version | int }}.yml"
- "../vars/{{ ansible_distribution }}.yml"
- "../vars/{{ ansible_os_family }}.yml"
- "../vars/default.yml"
when: virtualenv_package_name is not defined
tags: install

- name: Install depends
package: name={{ item }} state=present
become: yes
with_items: "{{ install_packages }}"
tags: install

- name: Install virtualenv
Expand All @@ -44,6 +33,13 @@
- pip
tags: install

- name: Install pycparser
# https://community.letsencrypt.org/t/certbot-auto-fails-while-setting-up-virtual-environment-complains-about-package-hashes/20529/22
pip: virtualenv="{{ letsencrypt_venv }}" virtualenv_site_packages=no name=pycparser version=2.13 state=present virtualenv_python=python2
become: yes
tags: install
when: ansible_os_family == "RedHat"

- name: More python depends
pip: virtualenv="{{ letsencrypt_venv }}" virtualenv_site_packages=no name=letsencrypt state=latest
become: yes
Expand Down
13 changes: 13 additions & 0 deletions vars/Debian-7.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
--- # Debian wheezy

virtualenv_package_name: python-virtualenv

install_packages:
- python
- python-dev
- python-virtualenv
- gcc
- dialog
- libaugeas0
- libssl-dev
- libffi-dev
- ca-certificates
- python-pip
- git
16 changes: 16 additions & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---

virtualenv_package_name: python-virtualenv

install_packages:
- python
- python-devel
- python-virtualenv
- gcc
- dialog
- augeas-libs
- openssl-devel
- libffi-devel
- ca-certificates
- python-pip
- git
13 changes: 13 additions & 0 deletions vars/Ubuntu-14.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
--- # Ubuntu Trusty

virtualenv_package_name: python-virtualenv

install_packages:
- python
- python-dev
- python-virtualenv
- gcc
- dialog
- libaugeas0
- libssl-dev
- libffi-dev
- ca-certificates
- python-pip
- git
2 changes: 2 additions & 0 deletions vars/default.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---

virtualenv_package_name: virtualenv

install_packages: []

0 comments on commit b8ab74b

Please sign in to comment.