--- /dev/null
+---
+- name: Install git
+ apt: name=git state=present
+
+- name: Create GOPATH directory
+ file: path={{ hostvars[inventory_hostname].gopath }} state=directory
+ when: GOPATH is undefined
+
+- name: Create directory for SLAV
+ file:
+ path: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV"
+ state: directory
+
+- name: Create directory for ARMv7 executables
+ file:
+ path: "{{ hostvars[inventory_hostname].gopath }}/bin/linux_armv7"
+ state: directory
+
+- name: Get MuxPi src
+ git:
+ repo: 'https://github.com/SamsungSLAV/muxpi'
+ dest: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV/muxpi"
+ version: 'v0.1.0'
+
+- name: Get dependencies
+ command: /usr/local/go/bin/go get ./...
+ args:
+ chdir: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV/muxpi"
+
+- name: Build stm executable
+ shell: >
+ {{ build_flags_muxpi }} /usr/local/go/bin/go build
+ -o "{{ hostvars[inventory_hostname].gopath }}/bin/linux_armv7/stm"
+ ./sw/nanopi/cmd/stm
+ args:
+ chdir: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV/muxpi"
+
+- name: Build fota executable
+ shell: >
+ {{ build_flags_muxpi }} /usr/local/go/bin/go build
+ -o "{{ hostvars[inventory_hostname].gopath }}/bin/linux_armv7/fota"
+ ./sw/nanopi/cmd/fota
+ args:
+ chdir: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV/muxpi"
+
+- name: Get Boruta src
+ git:
+ repo: 'https://github.com/SamsungSLAV/boruta'
+ dest: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV/boruta"
+ version: 'v0.1.0'
+
+- name: Get dependencies
+ command: /usr/local/go/bin/go get ./...
+ args:
+ chdir: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV/boruta"
+
+- name: Build dryad executable
+ shell: >
+ {{ build_flags_muxpi }} /usr/local/go/bin/go build
+ -o "{{ hostvars[inventory_hostname].gopath }}/bin/linux_armv7/dryad"
+ ./cmd/dryad
+ args:
+ chdir: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV/boruta"
--- /dev/null
+---
+- name: Install git
+ become: true
+ apt: name=git state=present
+
+- name: Install GCC
+ become: true
+ apt: name=gcc state=present
+
+- name: Create GOPATH directory
+ file: path={{ hostvars[inventory_hostname].gopath }} state=directory
+ when: GOPATH is undefined
+
+- name: Create directory for SLAV
+ file:
+ path: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV"
+ state: directory
+
+- name: Get Boruta src
+ git:
+ repo: 'https://github.com/SamsungSLAV/boruta'
+ dest: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV/boruta"
+ version: 'v0.1.0'
+
+- name: Get Weles src
+ git:
+ repo: 'https://github.com/SamsungSLAV/weles'
+ dest: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV/weles"
+ version: 'v0.1.0'
+
+- name: Get dependencies and install named packages
+ command: /usr/local/go/bin/go get ./...
+ args:
+ chdir: "{{ hostvars[inventory_hostname].gopath }}/src/github.com/SamsungSLAV/weles"
config.vm.provision "ansible" do |ansible|
ansible.playbook = "../ansible/main.yml"
ansible.groups = {
- "all_srvs:children" => "boruta_srv",
+ "all_srvs:children" => [ "boruta_srv", "weles_srv" ],
"boruta_srv" => "default",
"boruta_srv:vars" => {
- "gopath" => "~/go"
- }
+ "gopath" => "${HOME}/go"
+ },
+ "weles_srv" => "default",
+ "weles_srv:vars" => {
+ "gopath" => "${HOME}/go"
+ },
}
end
end