blob: b6108fbd94dedb08df92a069b136580f4ca2beae [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
- name: create rebar group
group:
name: rebar
state: present
- name: create rebar user
user:
name: rebar
createhome: yes
group: rebar
state: present
- name: download rebar
get_url:
url: https://github.com/rebar/rebar/archive/{{ rebar_version }}.tar.gz
dest: /home/rebar/
- name: unpack rebar
unarchive:
dest: /home/rebar
creates: /home/rebar/rebar-{{ rebar_version }}/bootstrap
group: rebar
owner: rebar
src: /home/rebar/rebar-{{ rebar_version }}.tar.gz
- name: bootstrap rebar
command: ./bootstrap
args:
chdir: /home/rebar/rebar-{{ rebar_version }}
creates: /home/rebar/rebar-{{ rebar_version }}/rebar
- name: copy rebar executable
command: cp /home/rebar/rebar-{{ rebar_version }}/rebar /usr/local/bin/
args:
creates: /usr/local/bin/rebar