node/install/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 27 Apr 2020 11:17:52 -0500
changeset 0 474ccafc2349
child 1 d3ef4e0b4baa
permissions -rw-r--r--
Initial commit of btcd and lnd roles.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: add node user
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  user: name="{{node_install_user}}"
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
- name: download node
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
  become: yes
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
  get_url:
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
    url: "{{node_install_url}}"
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
    dest: "/tmp/{{node_install_tar}}"
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
- name: unarchive node
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
  become: yes
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
  unarchive:
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
    remote_src: "yes"
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
    src: "/tmp/{{node_install_tar}}"
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
    dest: "/tmp"
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
    creates: "/tmp/{{node_install_tar_name}}/"
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
- name: install node
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
  become: yes
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
  shell: "install -m 0755 -o {{node_install_user}} -g {{node_install_user}} -t /usr/local/bin /tmp/{{node_install_tar_name}}/*"
474ccafc2349 Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
  changed_when: false