Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.142.42.247
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/ansible_collections/grafana/grafana/roles/grafana_agent/tasks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /lib/python3/dist-packages/ansible_collections/grafana/grafana/roles/grafana_agent/tasks/main.yml
- name: Install unzip on Ubuntu/Debian
  ansible.builtin.apt:
    name: unzip
    state: present
    update_cache: "{{ update_package_cache }}"
  when: install_unzip | bool and (ansible_distribution == "Ubuntu" or ansible_distribution == "Debian")

- name: Install unzip on Fedora/CentOS
  ansible.builtin.dnf:
    name: unzip
    state: latest
    update_cache: "{{ update_package_cache }}"
  when: install_unzip | bool and (ansible_distribution == "Fedora" or ansible_distribution == "CentOS")

- name: Download Grafana Agent binary from GitHub
  ansible.builtin.get_url:
    url: "https://github.com/grafana/agent/releases/download/v{{ agent_version }}/agent-{{ linux_architecture }}.zip"
    dest: "/tmp/agent-linux.zip"
    mode: '0644'

- name: Unarchive the Grafana Agent binary
  ansible.builtin.unarchive:
    src: "/tmp/agent-linux.zip"
    dest: "{{ agent_binary_location }}"
    remote_src: yes
    mode: '0755'

- name: Create directory for Grafana Agent Configuration file
  ansible.builtin.file:
    path: "{{ agent_config_location }}"
    state: directory
    mode: '0755'

- name: Create configuration file for Grafana Agent
  ansible.builtin.copy:
    src: "{{ agent_config_local_path }}"
    dest: "{{ agent_config_location }}/agent-config.yaml"

- name: Add user 'grafana-agent'
  ansible.builtin.user:
    name: grafana-agent
    create_home: no
    shell: /bin/false

- name: Create service file for Grafana Agent
  ansible.builtin.copy:
    dest: "/etc/systemd/system/grafana-agent.service"
    content: "{{ systemd_config }}"

- name: Start Grafana Agent service
  ansible.builtin.systemd:
    daemon_reload: yes
    name: grafana-agent
    enabled: yes
    state: "{{ systemd_service_state }}"

- name: Checking grafana-agent service status
  ansible.builtin.shell:
    cmd: systemctl is-active grafana-agent

Anon7 - 2022
AnonSec Team