From b8ab74ba564c10d4e3b3b4e073776bb1dabdfd10 Mon Sep 17 00:00:00 2001 From: Denis Nelubin Date: Mon, 3 Oct 2016 19:10:48 +0600 Subject: [PATCH] Added support of CentOS 7.2. --- meta/main.yml | 3 +++ tasks/main.yml | 32 ++++++++++++++------------------ vars/Debian-7.yml | 13 +++++++++++++ vars/RedHat.yml | 16 ++++++++++++++++ vars/Ubuntu-14.yml | 13 +++++++++++++ vars/default.yml | 2 ++ 6 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 vars/RedHat.yml diff --git a/meta/main.yml b/meta/main.yml index bad7b06..dcbacf7 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -14,6 +14,9 @@ galaxy_info: - name: Debian versions: - jessie + - name: CentOS + versions: + - 7.2 galaxy_tags: - networking diff --git a/tasks/main.yml b/tasks/main.yml index e3258a4..c955f97 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,23 +2,7 @@ - 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: @@ -26,7 +10,12 @@ - "../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 @@ -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 diff --git a/vars/Debian-7.yml b/vars/Debian-7.yml index 480dea6..5e9e009 100644 --- a/vars/Debian-7.yml +++ b/vars/Debian-7.yml @@ -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 \ No newline at end of file diff --git a/vars/RedHat.yml b/vars/RedHat.yml new file mode 100644 index 0000000..941cbbc --- /dev/null +++ b/vars/RedHat.yml @@ -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 diff --git a/vars/Ubuntu-14.yml b/vars/Ubuntu-14.yml index aa00a35..b774fb2 100644 --- a/vars/Ubuntu-14.yml +++ b/vars/Ubuntu-14.yml @@ -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 diff --git a/vars/default.yml b/vars/default.yml index 75ef05f..2a99a67 100644 --- a/vars/default.yml +++ b/vars/default.yml @@ -1,3 +1,5 @@ --- virtualenv_package_name: virtualenv + +install_packages: []