Skip to content

Instantly share code, notes, and snippets.

@kristiandelay
Last active November 5, 2024 00:30
Show Gist options
  • Select an option

  • Save kristiandelay/988be494b279aff3b0e1e7a1fe45d49c to your computer and use it in GitHub Desktop.

Select an option

Save kristiandelay/988be494b279aff3b0e1e7a1fe45d49c to your computer and use it in GitHub Desktop.
---
- name: Install Basic Tools, Initialize npm, and Configure Cloud-Init
hosts: localhost
become: yes
connection: local
vars:
ansible_python_interpreter: /usr/bin/python3
script_dir: "/usr/local/code/chaos-control-plane/plugins/run-remote-ansible-playbook/"
tasks:
- name: Update apt package index
apt:
update_cache: yes
- name: Install basic tools and build essentials
apt:
name:
- vim
- curl
- lrzsz
- git
- at
- atop
- zlib1g-dev
- wget
- build-essential
state: present
- name: Download netatop
get_url:
url: https://www.atoptool.nl/download/netatop-3.1.tar.gz
dest: /tmp/netatop-3.1.tar.gz
validate_certs: no
- name: Extract netatop package
ansible.builtin.unarchive:
src: /tmp/netatop-3.1.tar.gz
dest: /tmp
remote_src: yes
- name: Compile netatop
command: make
args:
chdir: /tmp/netatop-3.1
notify: Start netatop service
- name: Run 'make install' for netatop
command: make install
args:
chdir: /tmp/netatop-3.1
handlers:
- name: Start netatop service
systemd:
name:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment