From f59754bca63163fb61f238af5431674fbe9e4197 Mon Sep 17 00:00:00 2001 From: Dylan DiGeronimo Date: Wed, 15 Jan 2020 20:21:11 -0500 Subject: [PATCH] Add setup-prod.yml, update hosts and tasks --- hosts | 2 +- roles/cce_prod/tasks/main.yml | 6 ++---- setup-prod.yml | 18 +++++++++++++++++- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/hosts b/hosts index c255b13..4fde8f5 100644 --- a/hosts +++ b/hosts @@ -1,2 +1,2 @@ [production] -cce-prod ansible_host=cce.ebookfoundation.org ansible_user=ubuntu \ No newline at end of file +cce_prod ansible_host=cce.ebookfoundation.org ansible_user=ubuntu \ No newline at end of file diff --git a/roles/cce_prod/tasks/main.yml b/roles/cce_prod/tasks/main.yml index 8e40e26..63c67d4 100644 --- a/roles/cce_prod/tasks/main.yml +++ b/roles/cce_prod/tasks/main.yml @@ -95,11 +95,9 @@ group: "{{ user_name }}" mode: 0755 - - # TODO: Enable Nginx -# TODO: Configure HTTPS cert w/ Certbot +# Configure HTTPS cert w/ Certbot - name: Generate HTTPS cert become: true - command: "certbot --nginx" \ No newline at end of file + command: "certbot --nginx" # Does this command halt for [y/n] input? \ No newline at end of file diff --git a/setup-prod.yml b/setup-prod.yml index eec0c59..89e5189 100644 --- a/setup-prod.yml +++ b/setup-prod.yml @@ -1 +1,17 @@ -an \ No newline at end of file +- hosts: cce_prod + tasks: + - name: Add python repository + become: true + apt_repository: repo='ppa:deadsnakes/ppa' state=present + - name: Install python3.7 and pip + become: true + apt: + name: "{{ item }}" + update: true + update_cache: true + with_items: + - 'python3.7' + - 'python3-pip' + + - include_role: + name: cce_prod \ No newline at end of file