Skip to content

Commit

Permalink
Tag training node roles and restart sshd
Browse files Browse the repository at this point in the history
Tag the training node roles so that they can easily be run separately,
and make sure sshd restarts so that password authentication succeeds.
  • Loading branch information
skoranda committed May 8, 2020
1 parent 800579c commit 3722937
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ To provision the infrastructure execute the playbook:
ansible-playbook comanage_registry_training.yml
```

To reconfigure only the training nodes once they have already
been provisioned:

```
ansible-playbook training_nodes.yml --tags training_nodes
```

## SSH Access

Trainers may use their provisioned SSH keys to access all nodes. Each trainer
Expand Down
5 changes: 0 additions & 5 deletions roles/common/handlers/main.yml

This file was deleted.

7 changes: 5 additions & 2 deletions roles/common/tasks/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
path: /etc/ssh/sshd_config
regexp: '^PasswordAuthentication'
line: PasswordAuthentication yes
notify:
- restart sshd

- name: Restart sshd
systemd:
name: sshd
state: restarted

- name: Passwordless sudo
lineinfile:
Expand Down
6 changes: 6 additions & 0 deletions training_nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,13 @@

- import_role:
name: common
tags:
- training_nodes
- import_role:
name: swarm
tags:
- training_nodes
- import_role:
name: training
tags:
- training_nodes

0 comments on commit 3722937

Please sign in to comment.