├── .ansible-lint ├── .github ├── FUNDING.yml ├── stale.yml └── workflows │ ├── ci.yml │ └── release.yml ├── .gitignore ├── .yamllint ├── LICENSE ├── README.md ├── defaults └── main.yml ├── meta └── main.yml ├── molecule └── default │ ├── converge.yml │ ├── molecule.yml │ └── requirements.yml └── tasks └── main.yml /.ansible-lint: -------------------------------------------------------------------------------- 1 | skip_list: 2 | - 'yaml' 3 | - 'role-name' 4 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | --- 3 | github: geerlingguy 4 | patreon: geerlingguy 5 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | # Number of days of inactivity before an Issue or Pull Request becomes stale 4 | daysUntilStale: 90 5 | 6 | # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. 7 | # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. 8 | daysUntilClose: 30 9 | 10 | # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) 11 | onlyLabels: [] 12 | 13 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable 14 | exemptLabels: 15 | - pinned 16 | - security 17 | - planned 18 | 19 | # Set to true to ignore issues in a project (defaults to false) 20 | exemptProjects: false 21 | 22 | # Set to true to ignore issues in a milestone (defaults to false) 23 | exemptMilestones: false 24 | 25 | # Set to true to ignore issues with an assignee (defaults to false) 26 | exemptAssignees: false 27 | 28 | # Label to use when marking as stale 29 | staleLabel: stale 30 | 31 | # Limit the number of actions per hour, from 1-30. Default is 30 32 | limitPerRun: 30 33 | 34 | pulls: 35 | markComment: |- 36 | This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution! 37 | 38 | Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark pull requests as stale. 39 | 40 | unmarkComment: >- 41 | This pull request is no longer marked for closure. 42 | 43 | closeComment: >- 44 | This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details. 45 | 46 | issues: 47 | markComment: |- 48 | This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! 49 | 50 | Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale. 51 | 52 | unmarkComment: >- 53 | This issue is no longer marked for closure. 54 | 55 | closeComment: >- 56 | This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details. 57 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: CI 3 | 'on': 4 | pull_request: 5 | push: 6 | branches: 7 | - master 8 | schedule: 9 | - cron: "30 5 * * 5" 10 | 11 | defaults: 12 | run: 13 | working-directory: 'geerlingguy.pimpmylog' 14 | 15 | jobs: 16 | 17 | lint: 18 | name: Lint 19 | runs-on: ubuntu-latest 20 | steps: 21 | - name: Check out the codebase. 22 | uses: actions/checkout@v2 23 | with: 24 | path: 'geerlingguy.pimpmylog' 25 | 26 | - name: Set up Python 3. 27 | uses: actions/setup-python@v2 28 | with: 29 | python-version: '3.x' 30 | 31 | - name: Install test dependencies. 32 | run: pip3 install yamllint 33 | 34 | - name: Lint code. 35 | run: | 36 | yamllint . 37 | 38 | molecule: 39 | name: Molecule 40 | runs-on: ubuntu-latest 41 | strategy: 42 | matrix: 43 | distro: 44 | - centos7 45 | - ubuntu1804 46 | 47 | steps: 48 | - name: Check out the codebase. 49 | uses: actions/checkout@v2 50 | with: 51 | path: 'geerlingguy.pimpmylog' 52 | 53 | - name: Set up Python 3. 54 | uses: actions/setup-python@v2 55 | with: 56 | python-version: '3.x' 57 | 58 | - name: Install test dependencies. 59 | run: pip3 install ansible molecule[docker] docker 60 | 61 | - name: Run Molecule tests. 62 | run: molecule test 63 | env: 64 | PY_COLORS: '1' 65 | ANSIBLE_FORCE_COLOR: '1' 66 | MOLECULE_DISTRO: ${{ matrix.distro }} 67 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # This workflow requires a GALAXY_API_KEY secret present in the GitHub 3 | # repository or organization. 4 | # 5 | # See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy 6 | # See: https://github.com/ansible/galaxy/issues/46 7 | 8 | name: Release 9 | 'on': 10 | push: 11 | tags: 12 | - '*' 13 | 14 | defaults: 15 | run: 16 | working-directory: 'geerlingguy.pimpmylog' 17 | 18 | jobs: 19 | 20 | release: 21 | name: Release 22 | runs-on: ubuntu-latest 23 | steps: 24 | - name: Check out the codebase. 25 | uses: actions/checkout@v2 26 | with: 27 | path: 'geerlingguy.pimpmylog' 28 | 29 | - name: Set up Python 3. 30 | uses: actions/setup-python@v2 31 | with: 32 | python-version: '3.x' 33 | 34 | - name: Install Ansible. 35 | run: pip3 install ansible-base 36 | 37 | - name: Trigger a new import on Galaxy. 38 | run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.retry 2 | */__pycache__ 3 | *.pyc 4 | .cache 5 | 6 | -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | --- 2 | extends: default 3 | 4 | rules: 5 | line-length: 6 | max: 120 7 | level: warning 8 | 9 | ignore: | 10 | .github/stale.yml 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Jeff Geerling 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ansible Role: Pimp My Log 2 | 3 | > **DEPRECATED**: This role has been deprecated. Please consider using other tools like GoAccess or forking this role and maintaining your own version if you still want to use Pimp my Log. 4 | 5 | [![CI](https://github.com/geerlingguy/ansible-role-pimpmylog/workflows/CI/badge.svg?event=push)](https://github.com/geerlingguy/ansible-role-pimpmylog/actions?query=workflow%3ACI) 6 | 7 | Installs [Pimp my Log](http://pimpmylog.com/). 8 | 9 | ## Requirements 10 | 11 | Requires PHP to be installed on the server, and a web server like Apache, Nginx, IIS. You can get Pimp my Log set up pretty quickly with this role in tandem with `geerlingguy.apache` and `geerlingguy.php` available on Ansible Galaxy. 12 | 13 | ## Role Variables 14 | 15 | Available variables are listed below, along with default values (see `defaults/main.yml`): 16 | 17 | pimpmylog_install_dir: /var/www/pimpmylog 18 | 19 | The location where Pimp my Log will be installed. You should configure a virtual host or server entry pointing to this directory so you can access the interface. Otherwise, you could choose a location that's within an existing docroot, e.g. the default docroot `/var/www/html/pimpmylog`, and access Pimp my Log at `http://localhost/pimpmylog/`. 20 | 21 | pimpmylog_repo: https://github.com/potsky/PimpMyLog.git 22 | 23 | The git repository URL from which Pimp my Log will be cloned. 24 | 25 | pimpmylog_version: master 26 | 27 | The version of Pimp my Log to install. Can be any valid tag, branch, or `HEAD`. 28 | 29 | pimpmylog_grant_all_privs: false 30 | 31 | The setup of Pimp my Log allows for auto-configuration if the installation directory has `777` privileges, but this is an insecure way to install Pimp my Log. If you're installing on a local development environment, this is relatively harmless to set to `true` to ease installation... but if you're running this on a production or publicly-available server, don't even _think_ about changing this value! 32 | 33 | ## Dependencies 34 | 35 | None. 36 | 37 | ## Example Playbook 38 | 39 | - hosts: webservers 40 | roles: 41 | - { role: geerlingguy.apache } 42 | - { role: geerlingguy.php } 43 | - { role: geerlingguy.pimpmylog } 44 | 45 | ## License 46 | 47 | MIT / BSD 48 | 49 | ## Author Information 50 | 51 | This role was created in 2015 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/). 52 | -------------------------------------------------------------------------------- /defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | pimpmylog_install_dir: /var/www/pimpmylog 3 | pimpmylog_repo: https://github.com/potsky/PimpMyLog.git 4 | pimpmylog_version: master 5 | pimpmylog_grant_all_privs: false 6 | -------------------------------------------------------------------------------- /meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: [] 3 | 4 | galaxy_info: 5 | role_name: pimpmylog 6 | author: geerlingguy 7 | description: Pimp my Log installation for Linux 8 | company: "Midwestern Mac, LLC" 9 | license: "license (BSD, MIT)" 10 | min_ansible_version: 2.0 11 | platforms: 12 | - name: EL 13 | versions: 14 | - all 15 | - name: Debian 16 | versions: 17 | - all 18 | - name: Ubuntu 19 | versions: 20 | - all 21 | galaxy_tags: 22 | - development 23 | - web 24 | - server 25 | - php 26 | - logging 27 | - logs 28 | -------------------------------------------------------------------------------- /molecule/default/converge.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Converge 3 | hosts: all 4 | become: true 5 | 6 | vars: 7 | pimpmylog_grant_all_privs: true 8 | pimpmylog_install_dir: /var/www/html/pimpmylog 9 | php_default_version_debian: "7.2" 10 | 11 | pre_tasks: 12 | - name: Update apt cache. 13 | apt: update_cache=true cache_valid_time=600 14 | when: ansible_os_family == 'Debian' 15 | 16 | roles: 17 | - role: geerlingguy.git 18 | - role: geerlingguy.apache 19 | - role: geerlingguy.php 20 | - role: geerlingguy.pimpmylog 21 | 22 | post_tasks: 23 | - name: Ensure pimpmylog is running on the specified port. 24 | uri: 25 | url: "http://127.0.0.1/pimpmylog/" 26 | status_code: 200 27 | register: result 28 | until: result.status == 200 29 | retries: 60 30 | delay: 1 31 | -------------------------------------------------------------------------------- /molecule/default/molecule.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependency: 3 | name: galaxy 4 | driver: 5 | name: docker 6 | platforms: 7 | - name: instance 8 | image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest" 9 | command: ${MOLECULE_DOCKER_COMMAND:-""} 10 | volumes: 11 | - /sys/fs/cgroup:/sys/fs/cgroup:ro 12 | privileged: true 13 | pre_build_image: true 14 | provisioner: 15 | name: ansible 16 | playbooks: 17 | converge: ${MOLECULE_PLAYBOOK:-converge.yml} 18 | -------------------------------------------------------------------------------- /molecule/default/requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - src: geerlingguy.git 3 | - src: geerlingguy.apache 4 | - src: geerlingguy.php 5 | -------------------------------------------------------------------------------- /tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Clone Pimp my Log. 3 | git: 4 | dest: "{{ pimpmylog_install_dir }}" 5 | repo: "{{ pimpmylog_repo }}" 6 | version: "{{ pimpmylog_version }}" 7 | accept_hostkey: true 8 | 9 | - name: Grant all privileges on the Pimp my Log directory. 10 | file: 11 | path: "{{ pimpmylog_install_dir }}" 12 | state: directory 13 | mode: 0777 14 | when: pimpmylog_grant_all_privs 15 | --------------------------------------------------------------------------------