env-ansible/tasks/miner/gpu/ethminer.yml

70 lines
1.8 KiB
YAML

---
# Mine Ethereum with GPU!
## Dependencies ##
- name: Ethminer | Install Dependencies
package:
name:
- build-essential
- dkms
- cmake
- perl
- libdbus-1-dev
- mesa-common-dev
state: present
- name: Ethminer | Add PPA
apt_repository:
repo: ppa:ethereum/ethereum
update_cache: yes
state: present
- name: Ethminer | Install Ethereum
package:
name: ethereum
state: present
## Test ##
- name: Ethminer | Test If Installed
shell: "which ethminer"
register: ethminer_install
ignore_errors: yes
## Download ##
- name: Ethminer | Remove Git Repo
shell: 'cd /root/Downloads; rm -rf ethminer'
ignore_errors: yes
when: ethminer_install.failed
- name: Ethminer | Clone Git Repo
shell: 'cd /root/Downloads; git clone https://github.com/ethereum-mining/ethminer.git'
when: ethminer_install.failed
- name: Ethminer | Update Repo's Repos
shell: 'cd /root/Downloads/ethminer; git submodule update --init --recursive'
when: ethminer_install.failed
- name: Ethminer | Create Build Folder
shell: 'cd /root/Downloads/ethminer; mkdir -p build'
when: ethminer_install.failed
- name: Ethminer | cmake Flags
shell: 'cd /root/Downloads/ethminer/build; cmake .. -DETHASHCL=ON -DETHASHCUDA=OFF -DAPICORE=ON -DBINKERN=ON -DETHDBUS=ON -DUSE_SYS_OPENCL=OFF -DEVBUILD=ON'
when: ethminer_install.failed
- name: Ethminer | cmake Build
shell: 'cd /root/Downloads/ethminer/build; cmake --build .'
when: ethminer_install.failed
## Install #
- name: Ethminer | make install
shell: 'cd /root/Downloads/ethminer/build; make install'
when: ethminer_install.failed
## Personal Setup ##
- name: Ethminer | Download Script
shell: 'scp ling@leet:InstallFiles/Miners/ETH/ethminer.sh /home/mfn/; chmod 755 /home/mfn/ethminer.sh'