-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a Ubuntu Xenial VM to the Vagrantfile configuration. Since Ubuntu 16.04 doesn't include python by default, we have to modify `site.yml` to use install it before running any Ansible modules.
- Loading branch information
Showing
3 changed files
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.vagrant | ||
|
||
*.log | ||
*.retry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,32 @@ | ||
--- | ||
- hosts: all | ||
gather_facts: False | ||
|
||
pre_tasks: | ||
|
||
# Check Ubuntu release version to determine if we need to install Python 2, | ||
# an ansible dependency that isn't included by default in Ubuntu 16.04 and | ||
# up. | ||
|
||
- name: Check Ubuntu release | ||
raw: cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -d "=" -f2 | ||
register: ubuntu_release | ||
|
||
- debug: msg="Running ubuntu version {{ ubuntu_release.stdout }}" | ||
|
||
# Update apt cache and install python 2 for Ubuntu versions greater than 16.04 | ||
- name: Update APT cache | ||
raw: apt-get update | ||
become: True | ||
|
||
- name: Install Python | ||
raw: apt-get install -yq python | ||
become: True | ||
when: ubuntu_release.stdout | version_compare('16.04', '>=') | ||
|
||
# Gather facts once ansible dependencies are installed | ||
- name: Gather facts | ||
setup: | ||
|
||
roles: | ||
- { role: "app.papertrail" } |