Skip to content

credential rollover playbooks - admin access to experiment #8

Description

@timdrysdale

We need a method of rolling over the user account credentials on the experiments.

We presently use the default username for os, and a variety of passwords. So we have different user names.

The preferred outcome is to use passwordless ssh, with a consistent user name, that has passwordless sudo access so that it can run ansible scripts

possible playbook

- name: Add {{ sudo_user }} user
  user:
    name: "practable"
    groups: sudo
    append: true
    state: present
    createhome: true

- name: Make sudo without password for practable user
  copy:
    dest: /etc/sudoers.d/80-ansible-sudo-user
    content: "practable ALL=(ALL) NOPASSWD:ALL"
    mode: 0440

- name: Set up authorized keys for the practable user
  authorized_key: user=practable key="{{item}}"
  with_file:
    - {{EXPT_SECRETS}}/expt_rsa.pub

Note we'll want to use a modified version of the jump-playbook command to test this on a single host first, but jump-playbook does not yet pass the --limit option as referenced here:

ansible-playbook site.yml --limit datacenter2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions