Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/nhojpatrick/ansible-example-enrollment
- Owner: nhojpatrick
- License: mit
- Created: 2021-02-26T09:37:28.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-26T10:01:48.000Z (almost 4 years ago)
- Last Synced: 2024-11-24T04:23:15.601Z (2 months ago)
- Topics: ansible, ssh-keys, vagrant, virtualbox
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
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
```