Reworked core.

This commit is contained in:
Ronald Farrer 2023-02-10 17:24:40 -08:00
parent b950613976
commit 8c4cff3af3
8 changed files with 121 additions and 51 deletions

View file

@ -1,9 +1,9 @@
- name: Update repo list (update) and upgrade instance (upgrade)
- name: Update repo list (apt update) and upgrade instance (apt upgrade)
become: yes
ansible.builtin.apt:
update_cache: yes
- name: Upgrade the OS (dist-upgrade)
- name: Upgrade the OS (apt dist-upgrade)
become: yes
ansible.builtin.apt:
upgrade: dist
@ -14,12 +14,20 @@
name: p7zip
update_cache: yes
- name: jq
- name: Install jq
become: yes
ansible.builtin.apt:
name: jq
update_cache: yes
# usually included in the default install, but we'll make sure just in case...
- name: Install tmux
become: yes
ansible.builtin.apt:
name: tmux
update_cache: yes
#- name: Install build-essential
# become: yes
# ansible.builtin.apt:
@ -45,7 +53,8 @@
- name: Copy hashcat_start script
become: yes
ansible.builtin.copy:
#ansible.builtin.copy:
template:
src: hashcat_start.j2
dest: /usr/local/bin/hashcat_start
owner: root
@ -68,7 +77,8 @@
- name: Copy AWS Credentials
become: yes
ansible.builtin.copy:
#ansible.builtin.copy:
template:
src: credentials.j2
dest: /root/.aws/credentials
owner: root
@ -81,18 +91,36 @@
dest: /etc/fstab
line: '{{ item }}'
with_items:
- 'goofys#{{ s3.bucket_name }} {{ s3.mount_point }} fuse _netdev,allow_other,--file-mode=0660,--dir-mode=0770,--uid=1000,--gid=1000,--endpoint={{ s3.end_point }},noauto 0 0'
- 'goofys#{{ s3.bucket_name }} {{ s3.mount_point }} fuse _netdev,allow_other,--file-mode=0660,--dir-mode=0770,--uid=1000,--gid=1000,--endpoint={{ s3.end_point }} 0 0'
- name: Mount S3 bucket
become: yes
command: mount /mnt
args:
warn: no
become: true
command: mount /mnt
#args:
#warn: no
- name: Run hashcat
become: yes
shell: "(/usr/local/bin/hashcat_start >/dev/null 2>&1 &)"
###command: "(/usr/local/bin/hashcat_start &)"
- name: Copy .service
become: true
ansible.builtin.copy:
src: hashcat-cloud.service
dest: /etc/systemd/system/hashcat-cloud.service
owner: root
group: root
mode: '0644'
- name: Tell systemd to reread configs
become: true
ansible.builtin.systemd:
daemon_reload: true
- name: Enable .service
become: true
ansible.builtin.systemd:
state: stopped
enabled: true
name: hashcat-cloud
- name: Reboot!
become: true
ansible.builtin.reboot: