Files @ ea69b2719d8e
Branch filter:

Location: majic-ansible-roles/roles/bootstrap/tasks/main.yml

branko
MAR-22: Implemented tests for the common role:

- Added missing documentation for pipreqcheck_uid and pipreqcheck_gid
parameters.
- Use static-hashed passwords for reproducibility during testing in test
playbook.
- Install Emacs and libmariadb-client-lgpl-dev-compat via test playbook on one
of the testing instances in order to test related tasks.
- Fixed parameter for connection limitting in test playbook.
- Added explicit parameters to test playbook for pipreqcheck_gid and
pipreqcheck_uid.
- Fixed deployment of ferm configuration file ot include setting user/group and
mode.
- Added tests covering common deployment, deployment when only mandatory
parameters are provided, and deployment when optional parameters are set as
well.
---

- name: Install sudo
  apt: name=sudo state=installed

- name: Set-up the Ansible group
  group: name=ansible system=yes

- name: Set-up the Ansible user
  user: name=ansible system=yes group=ansible shell=/bin/bash

- name: Set-up authorized key for the Ansible user
  authorized_key: user=ansible key="{{ ansible_key }}"

- name: Set-up password-less sudo for the ansible user
  copy: src=ansible_sudo dest=/etc/sudoers.d/ansible mode=640 owner=root group=root

- name: Revoke rights for Ansible user to log-in as root to server via ssh
  authorized_key: user=root key="{{ ansible_key }}" state=absent

- name: Explicitly run all handlers
  include: ../handlers/main.yml
  when: "handlers | default(False) | bool() == True"
  tags:
    - handlers