Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nhojpatrick/ansible-example-enrollment

Ansible Example of Enrollment
https://github.com/nhojpatrick/ansible-example-enrollment

ansible ssh-keys vagrant virtualbox

Last synced: 3 days ago
JSON representation

Ansible Example of Enrollment

Awesome Lists containing this project

README

        

# Vagrant Example of Enrollment

## Creation Your Own SSH Key

```bash
$ ssh-keygen -f provisioning/.ssh/id_ed25519 -t ed25519 -N "" -C "[email protected]"
```

## What to do...

### Setup

```bash
$ vagrant up
```

### Setup touchdown

```bash
$ vagrant ssh touchdown
```

### Configure

```bash
$ vagrant ssh touchdown
vagrant@touchdown:~$ sudo apt install sshpass
vagrant@touchdown:~$ cd /vagrant/setup/
vagrant@touchdown:/vagrant/setup$ ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts-p0-dc0 -i hosts-p0-dc1 playbook_0_setup.yaml
```

### Enrollment

```bash
vagrant@touchdown:/vagrant/setup$ su - ruser
ruser@touchdown:~$ cd /vagrant/setup/
ruser@touchdown:/vagrant/setup/$ ansible-galaxy collection install ansible.posix
ruser@touchdown:/vagrant/setup/$ ssh-keygen
ruser@touchdown:/vagrant/setup/$ ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts-p0-dc0 -i hosts-p0-dc1 playbook_1_enrol_0_known_hosts.yaml --ask-pass
ruser@touchdown:/vagrant/setup/$ ansible-playbook -i hosts-p0-dc0 -i hosts-p0-dc1 playbook_1_enrol_1_authorized_key.yaml --ask-pass
```

### Checking

```bash
vagrant@touchdown:/vagrant/setup$ su - ruser
ruser@touchdown:~$ cd /vagrant/setup/
ruser@touchdown:/vagrant/setup/$ ansible-playbook -i hosts-p0-dc0 -i hosts-p0-dc1 playbook_2_check.yaml
```