GithubHelp home page GithubHelp logo

robertdebock / ansible-role-ara Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 3.0 323 KB

Install and configure ara on your system.

Home Page: https://robertdebock.nl/

License: Apache License 2.0

ara ansiblerecordsansible arareportsansible cloud development monitoring reporting hacktoberfest ansible molecule

ansible-role-ara's Introduction

ARCHIVED

This role is archived. David maintains a much better collection to do the same thing.

Install and configure ara on your system.

GitHub GitLab Quality Downloads Version
github gitlab quality downloads Version

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

---
- name: Converge
  hosts: all
  become: yes
  gather_facts: yes

  roles:
    - role: robertdebock.ara

The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  become: yes
  gather_facts: no

  roles:
    - role: robertdebock.bootstrap
    - role: robertdebock.buildtools
    - role: robertdebock.epel
    - role: robertdebock.python_pip

Also see a full explanation and example on how to use these roles.

The default values for the variables are set in defaults/main.yml:

---
# defaults file for ara

# The ansible.cfg to modify.
ara_configuration_file: /etc/ansible/ansible.cfg

# The user to run ara as. Typically root, but if you run playbooks under your username, ara saves data in your homedirectory. In that case change the ara_user to your username.
ara_user: root

# This role tries to "find" python. If you are using a specific path to python,
# you can set `ara_callback_plugins`. For example:
# ara_python_plugins_path: /home/username/venv/site-packages/ara/plugins/callback

# Extra options can be set using this structure.
# ara_configuration:
#   - option: port
#     value: 9191
#   - option: host
#     value: "0.0.0.0"
#   - option: playbook_per_page
#     value: 10
#   - option: result_per_page
#     value: 25

The following roles are used to prepare a system. You can prepare your system in another way.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab
robertdebock.buildtools Build Status GitHub Build Status GitLab
robertdebock.epel Build Status GitHub Build Status GitLab
robertdebock.python_pip Build Status GitHub Build Status GitLab
robertdebock.service Build Status GitHub Build Status GitLab

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles: dependencies

This role has been tested on these container images:

container tags
el 8
debian all
fedora all
ubuntu bionic

The minimum version of Ansible required is 2.10, tests have been done to:

  • The previous version.
  • The current version.
  • The development version.

Some roles can't run on a specific distribution or version. Here are some exceptions.

variation reason
alpine Could not find a version that satisfies the requirement Django>=2.1.5
centos:7 No matching distribution found for Django>=2.1.5
amazonlinux:1 No package matching 'python3-pip'
amazonlinux No module named pkg_resources

If you find issues, please register them in GitHub

Apache-2.0

Robert de Bock

Please consider sponsoring me.

ansible-role-ara's People

Contributors

robert-de-bock avatar robertdebock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansible-role-ara's Issues

/etc/init.d/ara: 63: /etc/init.d/ara: Syntax error: Missing '))'\n

ISSUE TYPE
  • Bug Report
OS / ENVIRONMENT

Debian and Ubuntu

ACTUAL RESULTS
TASK [robertdebock.ara : start and enable ara] *********************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "/etc/init.d/ara: 63: /etc/init.d/ara: Syntax error: Missing '))'\n"}

Startup script throws error.

ISSUE TYPE
  • Bug Report
SUMMARY
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error loading unit file 'ara': System.Error.ENOEXEC \"Exec format error\""}

install fails at `TASK [robertdebock.ara : try python2]`

Describe the bug

After installing all the requirements, the ara role fails to install.

Playbook

$ ansible-playbook -K ara.yml

Please paste the playbook you are using. (Consider requirements.yml and
optionally the command you've invoked.)

---
- name: Install ara
  hosts: all
  become: yes
  gather_facts: yes

  roles:
    - role: robertdebock.ara

I tried both of these inventory:
localhost ansible_connection=local ansible_python_interpreter=/home/blaise/venv/bin/python
and
localhost ansible_connection=local ansible_python_interpreter=/home/blaise/venv/bin/python3

Output

TASK [robertdebock.ara : try python2] **********************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["python", "-m", "ara.setup.callback_plugins"], "delta": "0:00:00.033111", "end": "2022-01-09 23:26:36.202636", "msg": "non-zero return code", "rc": 1, "start": "2022-01-09 23:26:36.169525", "stderr": "/usr/bin/python: Error while finding module specification for 'ara.setup.callback_plugins' (ModuleNotFoundError: No module named 'ara')", "stderr_lines": ["/usr/bin/python: Error while finding module specification for 'ara.setup.callback_plugins' (ModuleNotFoundError: No module named 'ara')"], "stdout": "", "stdout_lines": []}

TASK [robertdebock.ara : try python3] **********************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["python3", "-m", "ara.setup.callback_plugins"], "delta": "0:00:00.030415", "end": "2022-01-09 23:26:36.593164", "msg": "non-zero return code", "rc": 1, "start": "2022-01-09 23:26:36.562749", "stderr": "/usr/bin/python3: Error while finding module specification for 'ara.setup.callback_plugins' (ModuleNotFoundError: No module named 'ara')", "stderr_lines": ["/usr/bin/python3: Error while finding module specification for 'ara.setup.callback_plugins' (ModuleNotFoundError: No module named 'ara')"], "stdout": "", "stdout_lines": []}

Environment

  • Control node OS: [e.g. Debian 9] (cat /etc/os-release)
NAME="Fedora Linux"
VERSION="35 (Server Edition)"
ID=fedora
VERSION_ID=35
VERSION_CODENAME=""
PLATFORM_ID="platform:f35"
PRETTY_NAME="Fedora Linux 35 (Server Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:35"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f35/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=35
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=35
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Server Edition"
VARIANT_ID=server
  • Control node Ansible version: [e.g. 2.9.1] (ansible --version)
ansible [core 2.12.1]
  config file = /home/blaise/src/stacks/bootstrap/ansible.cfg
  configured module search path = ['/home/blaise/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/blaise/venv/lib64/python3.10/site-packages/ansible
  ansible collection location = /home/blaise/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/blaise/venv/bin/ansible
  python version = 3.10.1 (main, Dec  9 2021, 00:00:00) [GCC 11.2.1 20211203 (Red Hat 11.2.1-7)]
  jinja version = 3.0.3
  libyaml = False
  • Managed node OS: [e.g. CentOS 7] (cat /etc/os-release)
    the same machine

  • Roles

(venv) [blaise@ucs220a bootstrap]$ ansible-galaxy list
# /home/blaise/src/stacks/bootstrap/roles
- robertdebock.bootstrap, 5.2.11
- robertdebock.buildtools, 3.1.6
- robertdebock.epel, 3.1.4
- robertdebock.python_pip, 4.2.7
- robertdebock.ara, 3.1.1
- robertdebock.service, 3.1.2

Please consider sponsoring me.
I'm a sponsor for over a year!

Collaboration on the role ?

Hi!

I'm the author of ARA -- I just came across this role and I like what I'm seeing. Great work ๐Ÿ‘

We're actually in the process of building an awesome and tightly integrated role for ARA and I was curious if you'd be interested in collaborating ?
We're planning to leverage the role as an easy way of deploying ARA but also to integration test ARA itself.

The role can be found here: https://github.com/openstack/ansible-role-ara

Let me know if you'd like to chat !

Debian startup fails.

ISSUE TYPE
  • Bug Report
OS / ENVIRONMENT

Debian

SUMMARY

The systemd script fails, because ara-manage is in an unxpected location: /usr/local/bin/ara-manage instead of /usr/bin/ara-manage.

ACTUAL RESULTS
vagrant@ara-debian-jessie64:~$ systemctl status ara
โ— ara.service - Ansible Runtime Analyser
   Loaded: loaded (/etc/systemd/system/ara.service; enabled)
   Active: failed (Result: exit-code) since Sun 2018-05-13 08:00:45 UTC; 3min 44s ago
 Main PID: 15093 (code=exited, status=203/EXEC)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.