Merge "Update cloud image Ubuntu18.04 docker x86_64"
[releng/builder.git] / packer / provision / local-builder.yaml
1 ---
2 - import_playbook: ../common-packer/provision/baseline.yaml
3 - import_playbook: ../common-packer/provision/docker.yaml
4
5 - hosts: all
6   become_user: root
7   become_method: sudo
8   vars:
9     elastic_search_checksum: sha256:0aa58947d66b487488e86059352deb7c6cab5da4accdff043cce9fed7c3d2fa7
10     elastic_search_version: 1.7.5
11
12   pre_tasks:
13     - include_role: name=lfit.system-update
14
15   tasks:
16     - name: Install Elastic Search
17       block:
18         - name: "Fetch Elastic Search to /tmp/elasticsearch-{{elastic_search_version}}.tar.gz"
19           get_url:
20             url: "https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-{{elastic_search_version}}.tar.gz"
21             dest: "/tmp/elasticsearch-{{elastic_search_version}}.tar.gz"
22             checksum: "{{elastic_search_checksum}}"
23         - name: Make /tmp/elasticsearch directory
24           file:
25             path: /tmp/elasticsearch
26             state: directory
27             mode: 0755
28         - name: Untar Elastic Search to /tmp/elasticsearch
29           unarchive:
30             src: "/tmp/elasticsearch-{{elastic_search_version}}.tar.gz"
31             dest: /tmp/elasticsearch
32             remote_src: true
33
34   post_tasks:
35     - name: System Reseal
36       script: ../common-packer/provision/system-reseal.sh
37       become: true