forked from yorkulibraries/yudl-playbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.yml
42 lines (36 loc) · 1.21 KB
/
bootstrap.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
- name: bootstrap
hosts: all
become: yes
gather_facts: false
tasks:
# python isn't installed by default on ubuntu so we need
# to do that with the raw command before
- name: install python
raw: test -e /usr/bin/python || (apt-get update; apt-get install -y python-is-python3;)
register: output
changed_when:
- output.stdout|length > 0
- output.stdout != "\r\n"
when: islandora_distro|default('') is match("ubuntu/")
# Manually gather facts once python is installed
- name: gather facts
setup:
# Include OS specific variables (like PHP stuff)
- name: include OS specific variables
include_vars: "vars/{{ ansible_os_family }}.yml"
# also need to make sure aptitude is installed for the apt
# commands in ansible.
- name: install aptitude
apt:
name: aptitude
state: present
update_cache: yes
when: ansible_os_family == "Debian"
# install some packages we would like on every server
- name: install extra packages ubuntu
package:
name: "{{ item }}"
state: present
with_items: "{{ islandora_extra_ubuntu_packages }}"
when: ansible_os_family == "Debian"