-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.yml
67 lines (56 loc) · 2.11 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
- 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"
- name: Get Imagemagick
git:
repo: https://github.com/ImageMagick/ImageMagick.git
dest: /opt/imagemagick
version: 7.1.0-61
force: yes
- name: Configure ImageMagick
command: "./configure --disable-shared --with-jp2=yes --with-openjp2=yes --with-png=yes"
args:
chdir: "/opt/imagemagick"
- name: Make and install ImageMagick
shell: "make -j {{ ansible_processor_vcpus }} && make install && ldconfig"
args:
chdir: "/opt/imagemagick"
- name: Redis setup
shell: 'curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg; echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list'
- name: Install Redis
package:
name: redis
state: present