Howto Provision Vagrant Virtual Machines with Ansible

  Рет қаралды 12,727

theurbanpenguin

theurbanpenguin

3 жыл бұрын

Let's show how great Ansible is to provision vagrant virtual machines. On my MacOS host Inhave Vagrant from HashiCorp installed along with VirtualBox an Ansible. We will first look at using Vagrant before seeing how Ansible Playbook and really provision your VM and easily.
The Playbook is copied below:
---
- name: test
hosts: all
gather_facts: true
become: true
handlers:
- name: restart_sshd
service:
name: sshd
state: restarted
tasks:
- name: install
package:
state: latest
name:
- bash-completion
- vim
- nano
- name: Create tux user
user:
name: tux
state: present
password: "{{ 'Password1' | password_hash('sha512') }}"
update_password: on_create
shell: /bin/bash
- name: Edit SSHD Config
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^PasswordAuthentication '
insertafter: '#PasswordAuthentication'
line: 'PasswordAuthentication yes'
notify: restart_sshd
- name: Add sudo rights for tux
copy:
dest: /etc/sudoers.d/tux
content: "tux ALL=(root) NOPASSWD: ALL"
backup: true
pluralsight.com/training/Autho... and take time to see my own site www.theurbanpenguin.com

Пікірлер: 21
@jenkinssthomson8879
@jenkinssthomson8879 3 жыл бұрын
Thank you! You have a gift of explaining and simplifying complex ideas.
@theurbanpenguin
@theurbanpenguin 3 жыл бұрын
Thanks for the comment
@neorejdv
@neorejdv 3 жыл бұрын
Thank you! Learned a lot, as always from your excellent tutors! Keep them coming!
@theurbanpenguin
@theurbanpenguin 3 жыл бұрын
Thank you
@bobreselman5731
@bobreselman5731 2 жыл бұрын
Very informative, clear video. Great teaching style!
@schiinke
@schiinke 3 жыл бұрын
You have just got one more subscriber! Awesome video!
@RicDeez
@RicDeez 2 жыл бұрын
Excellent video, super clear explanations... Thank you!
@sirusvirtus5885
@sirusvirtus5885 3 жыл бұрын
Awesome 👍
@mehedihasanshuvo4874
@mehedihasanshuvo4874 2 жыл бұрын
Excellent tutorial. Thank you very much
@balloney2175
@balloney2175 2 жыл бұрын
Awesome video! I learned a lot... I don't need to use AWX, I guess for my studying. Please provide us some more tutorials.
@pravinjunnarkar8155
@pravinjunnarkar8155 2 жыл бұрын
Awesome, simplicity in explanation, in depth knowledge.... Just wanted to know how u are setting indentation marker with vim... Thanks
@zachlemley2174
@zachlemley2174 2 жыл бұрын
I am sure a lot has changed since the creation of this video: but re-creating it now there seems to be an encryption issue where ansible is looking for passlib?
@artyomv.3220
@artyomv.3220 3 жыл бұрын
Hello, Tux. Thank you for this interesting lesson. Can you please advise me how to set up the hilighting syntax in Vim as it has done on the video?
@artyomv.3220
@artyomv.3220 3 жыл бұрын
@Domy many thanks
@theurbanpenguin
@theurbanpenguin 3 жыл бұрын
As @domy says the earlier videos in the Ansible playlist show this. My .vimrc setting are as one line: autocmd FileType yaml setlocal ai et cuc cul ts=2 sw=2 The cuc highlights the cursor current column and is really useful where the indent level important such as YAML and Python
@artyomv.3220
@artyomv.3220 3 жыл бұрын
@@theurbanpenguin Thank you
@DrKnow65
@DrKnow65 3 жыл бұрын
"The toast to my marmalade" huh? Somehow that just rings odd... :)
@rougearlequin
@rougearlequin 2 жыл бұрын
I used the box centos/7 and it prompted for pass. The default didn't work.
@pawecyrklaf4729
@pawecyrklaf4729 3 жыл бұрын
Hello Andrew :) Can you recommend any course for RHCSA 8? I got LFCS, but now time for RHCSA.
@theurbanpenguin
@theurbanpenguin 3 жыл бұрын
If you still have your Pluralsight subscription the rHCSA 8 track has started there are 4 courses so far. 3 recent, this year, and the podman course from last year
@pawecyrklaf4729
@pawecyrklaf4729 3 жыл бұрын
@@theurbanpenguin Thank you for your answer. I have to look because I found only your LFCS/RHCSA course under Centos 7
Managing AWS Instances Using Ansible
12:40
theurbanpenguin
Рет қаралды 4,2 М.
Getting started with Ansible 02 - SSH Overview & Setup
28:51
Learn Linux TV
Рет қаралды 214 М.
Каха с волосами
01:00
К-Media
Рет қаралды 6 МЛН
I MADE A CARDBOARD SWING!#asmr
00:40
HAYATAKU はやたく
Рет қаралды 31 МЛН
SHE WANTED CHIPS, BUT SHE GOT CARROTS 🤣🥕
00:19
OKUNJATA
Рет қаралды 8 МЛН
Automated virtual machine deployment with Vagrant
20:28
Christian Lempa
Рет қаралды 52 М.
Ditch Virtualbox, Get QEMU/Virt Manager
13:21
Mental Outlaw
Рет қаралды 311 М.
Vagrant vs Docker: Which Is Right for You? (Could Be Both)
9:02
Automate your virtual lab environment with Ansible and Vagrant
20:38
Christian Lempa
Рет қаралды 34 М.
Samsung TV Repair and Upgrade!
10:25
The 8-Bit Guy
Рет қаралды 94 М.
How to protect Linux from Hackers // My server security strategy!
30:39
Christian Lempa
Рет қаралды 208 М.
the new PS4 jailbreak is sort of hilarious
12:21
Low Level Learning
Рет қаралды 31 М.
Ansible vs. Terraform vs. Vagrant: What's the difference?
3:10
Eye on Tech
Рет қаралды 7 М.
Каха с волосами
01:00
К-Media
Рет қаралды 6 МЛН