diff --git a/.github/workflows/ansible.yml b/.github/workflows/ansible.yml deleted file mode 100644 index edcef52..0000000 --- a/.github/workflows/ansible.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Ansible - -on: [push, pull_request] - -jobs: - - linter: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Lint Ansible Playbook - uses: ansible/ansible-lint-action@master - - release: - needs: - - linter - runs-on: ubuntu-latest - steps: - - name: galaxy - uses: robertdebock/galaxy-action@1.0.3 - with: - galaxy_api_key: ${{ secrets.galaxy_api_key }} \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b343972 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,15 @@ +--- +name: Lint + +"on": + - push + - pull_request + +jobs: + + linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Lint Ansible Playbook + uses: ansible/ansible-lint-action@master diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..249c448 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,15 @@ +--- +name: Publish to Galaxy + +"on": + release: + types: [created] + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.1.0 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/README.md b/README.md index f32b2a0..5b522c7 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ Role Name Deploy and configure [Loki/Promtail](https://github.com/grafana/loki) using Ansible. +This is a fork of a simple and extremely useful diogenxs.loki role. + Requirements ------------ @@ -16,7 +18,9 @@ Install Loki and Promtail in local machine ```yml - hosts: servers roles: - - { role: diogenxs.loki, loki_bins: ['loki', 'promtail'] } + - role: diogenxs.loki + vars: + loki_bins: ['loki', 'promtail'] } ``` License @@ -27,4 +31,6 @@ WTFPL see [LICENSE](license) Author Information ------------------ -https://diogenxs.dev \ No newline at end of file +Fork maintainer: [weakcamel](https://galaxy.ansible.com/weakcamel) + +Original author (all credits due): https://diogenxs.dev diff --git a/tasks/install.yml b/tasks/install.yml index 467c5c2..d3beb7c 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -38,7 +38,7 @@ - "{{ loki_config_dir }}" - block: - - name: download binaries to local folder + - name: download binaries to a temporary folder become: false get_url: url: "https://github.com/grafana/loki/releases/download/v{{ loki_version }}/{{ item }}-linux-{{ go_arch }}.zip" @@ -49,7 +49,6 @@ retries: 5 delay: 2 loop: "{{ loki_bins }}" - delegate_to: localhost check_mode: false - name: unpack binaries @@ -59,7 +58,6 @@ dest: "/tmp" creates: "/tmp/{{ item }}-{{ loki_version }}-linux-{{ go_arch }}" loop: "{{ loki_bins }}" - delegate_to: localhost check_mode: false - name: propagate official binaries @@ -69,6 +67,7 @@ mode: 0755 owner: root group: root + remote_src: true loop: "{{ loki_bins }}" notify: - restart loki