Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
63 lines (51 sloc) 1.87 KB
---
- hosts: all
become: yes
# if the distro doesn't ship with python
# this shims it in before fact gathering
gather_facts: false
pre_tasks:
- name: Install python2 for Ansible
raw: sh -c "test -e /usr/bin/python || ( ( test -e /usr/bin/apt && apt -qqy update && apt install -qqy python-minimal) || ( test -e /usr/bin/dnf && /usr/bin/dnf -qy install python) || ( test -e /usr/bin/yum && /usr/bin/yum -qy install python) )"
register: output
changed_when: 'output.stdout|trim() != ""'
- name: Gathering Facts
setup:
tags: always
# end of python shim
tasks:
- block:
- debug:
var: apache_profile
- import_role:
# set mysql_profile to control mysql flavor and version
name: limepepper.mysql
- import_role:
# set apache_profile to override default packages
name: limepepper.apache
vars:
apache_opts:
- php/mod_php
- ssl/mod_ssl
- rewrite
- name: import the role limepepper.wordpress in test.yml playbook
import_role:
name: '{{playbook_dir}}/..'
always:
- name: create the var cache directory
file:
name: "/var/cache/ansible/attributes"
state: directory
tags: always
- name: write out the hostvars to json for inspec testing
copy:
content: "{{ hostvars[inventory_hostname] | strip_fieldattributes | to_nice_json }}"
dest: "/var/cache/ansible/attributes/hostvars.json"
changed_when: false
tags: always
# the idea here, is that if any of the tasks fail, it will add useful
# troubleshooing tools to the build.
rescue:
- name: include the debugger script
include_tasks: ../tasks/bootstrap/distro-debug-packages.yml
tags: always