diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..cb0c7b81 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,48 @@ +name: Test suite +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + tests: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-16.04, ubuntu-18.04] + rails_env: [staging, production] + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.6 + uses: actions/setup-python@v2 + if: ${{ matrix.os != 'ubuntu-16.04' }} + with: + python-version: 3.6 + + # https://github.com/pypa/pip/pull/9189 + - name: Install python3.6 on Ubuntu 16.04 + if: ${{ matrix.os == 'ubuntu-16.04' }} + run: | + sudo add-apt-repository -y ppa:deadsnakes/ppa + sudo apt-get update + sudo apt-get install -y python3.6 python3.6-dev python3.6-venv + wget https://bootstrap.pypa.io/get-pip.py + sudo -H python3.6 get-pip.py + sudo ln -s /usr/bin/python3.6 /usr/local/bin/python3 + sudo ln -s /usr/bin/python3.6 /usr/local/bin/python + - name: Install Ansible + run: pip install ansible + - name: Update system packages + run: sudo apt-get update -y + - name: Install OpenSSH + run: sudo apt-get install -y openssh-server + - name: Generate dummy SSH key + run: ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa + - name: Create hosts file + run: echo "localhost ansible_connection=local ansible_user=root" > hosts + - name: Run CONSUL installer + run: ansible-playbook consul.yml -i hosts --extra-vars "env=${{ matrix.rails_env }} domain=localhost errbit=True" -vvv diff --git a/README.md b/README.md index df01ad44..d0beb033 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ A remote server with one of the supported distributions: - Ubuntu 16.04 x64 - Ubuntu 18.04 x64 -Access to a remote server via public ssh key without password. +Access to a remote server via public ssh key without password. If you don't have a SSH key pair yet, you can generate it with `ssh-keygen` command on Linux based systems, this key will be added to the `deploy` user `.ssh/authorized_keys` file during installation process so the machine from where running the installer has access to the servers as the `deploy` user. The default user is `deploy` but you can [use any user](#using-a-different-user-than-deploy) with sudo privileges. ``` diff --git a/roles/errbit/tasks/main.yml b/roles/errbit/tasks/main.yml index 7bad566d..77f46ca9 100644 --- a/roles/errbit/tasks/main.yml +++ b/roles/errbit/tasks/main.yml @@ -12,7 +12,7 @@ - name: Use bundler 1.x replace: path: "{{ errbit_dir }}/Gemfile.lock" - regexp: ' 2.1.2' + regexp: ' 2.1.4' replace: ' 1.17.1' - name: Create log folder diff --git a/roles/mongodb/tasks/main.yml b/roles/mongodb/tasks/main.yml index 470f4f97..e7fb7c23 100644 --- a/roles/mongodb/tasks/main.yml +++ b/roles/mongodb/tasks/main.yml @@ -1,5 +1,15 @@ -- name: Install MongoDB +- name: Uninstall preinstalled MongoDB versions + apt: + name: + - mongodb* + - mongodb-org* + purge: yes + state: absent + ignore_errors: yes + +- name: Install latest MongoDB version apt: name: - mongodb - mongodb-server + state: present