DevLinux
DevLinux
  • Видео 72
  • Просмотров 121 685
Ansible# 15 - Register in Variables Output from System Commands - register and Python List
Ansible provides ways to print results from system commands if they return any. Some results are almost always available such as Return Code or Exit Status.
We see that the Ansible Adhoc command does nor require any extra code to print results from a command. However, when running a command from within an Ansible Playbook, we need to create a variable that can be used to store results.
Watch this video to understand:
- How to capture output and register it into a variable
- How to use a Python List
- How to apply a condition with the "when" statement to mark a task for execution or skip
- How to use the "in" operator which is widely used in Python collections such as List and Dictionary...
Просмотров: 879

Видео

Ansible# 14 - Variables and their Scopes in Ansible Playbook - Ansible Facts and Module setup
Просмотров 2722 года назад
In our video# 6 [ruclips.net/video/hojFn4rBnyA/видео.html] we discussed how to use the Ansible Facts and the related module named "setup" to gather a number of details about our Ansible environment and systems. In this lab exercise, we discuss how to define and use Ansible's inbuilt variables or system variables, and also discuss how to create our own variables from scratch. We understand the d...
Ansible# 13 - Deploy a Webpage and Restart Apache Server - copy and service modules
Просмотров 2142 года назад
We take this lab exercise to present a full fledged scenario in which we create a webpage and deploy it on to our Apache Server running on a controlled host or remote server. We then restart the Apache Server or the httpd service and ensure that the service is automatically started up across system reboots. We also see an example of elinks text-based browser and you can follow this exercise to ...
Ansible# 12 - How to create an Ansible Provisioning User Account with sudo Access
Просмотров 9102 года назад
Often you would be using a dedicated user or system (application) account to run Ansible deployments. You might not prefer to login as root and then execute Ansible commands and playbooks. Instead, you would like to become root as and when required and then do the work that only the super user can do or some account with the super user capabilities. In this lab exercise, we discuss and learn: -...
Ansible# 11 - Copy and Fetch Modules - Copy Directories Recursively and Copy Files from Remote Hosts
Просмотров 5572 года назад
We continue exploring the Ansible "copy" module. We also learn about the Ansible "fetch" module which is similar to the copy module but does the opposite of it - the fetch module fetches, that is to say download files from the remote server or servers on to the local server which is the control node or Ansible server. Continue watching this video to: - Learn how to copy an entire directory stru...
Ansible# 10 - Copy Module to Copy Files and Directories on Remote Servers - Exampes of File Module
Просмотров 6292 года назад
As part of Configuration Management or Enterprise Deployment, it is very common to roll out files and configs to multiple hosts for uniformaty purposes and to have identical system setup or application setup across the systems in scope. Go through this exercise to understand: - how to copy files and directories to remote servers - how to copy and check if a file has been copied to remote server...
Ansible# 9 - File Module and Copy Module to Work with Files and Directories in Ansible
Просмотров 1782 года назад
Ansible file and copy modules are very important for us as we transfer and copy or update configuration files and othe text files or programs from time time in our project acticvities. - the Ansible FIle Module can be used to ensure that a file or directory is present or is absent. - the Ansible Copy Module can be used to transfer / copy files and directories to multiple remote hosts in one go....
Ansible# 8 - How to Use Ansible Configuration File and Specify a Default Inventory
Просмотров 1,5 тыс.2 года назад
In this video, we build our understanding of the default Ansible Configuration file and of the default Ansible Inventory file. We further see how we can modify those files and create our own local Ansible Config and Inventory files. The information as shared in the current video is basic and we should understand the basics first. And this part is not only basic but essential too.
Ansible# 7 - How to Design an Ansible Playbook and Create Multiple Plays and Tasks
Просмотров 2032 года назад
Anisble Playbooks would usually consit of one or more plays with each play having its own seperate tasks or actions. Seperating one play, which is actually a set of actions, from another play can dramatically help you document your playbooks making them more readable and understandable. In this lab exerise, we walk through some such scenarios and explore how we can write better playbooks. Thoug...
How to tell if it is a Physical Server or Virtual Machine - VM? - dmidecode command shows BIOS Info
Просмотров 6582 года назад
Follow this lab exercise to understand: - how to show SMBIOS or BIOS Information - how to show hardware components details - how to show configuration of virtual machines - how to confirm if a server is a VM or a physical server - how to show Serial Number of your system - how to take a dump of the current state of your system and use it later post changes made to your system
Ansible# 6 - How to Gather Facts and Variables about Local Host and Remote Hosts - Module facts
Просмотров 5492 года назад
Ansible by default gathers facts about controlled nodes or remote hosts when you run a playbook. Those facts can provide helpful variables which we can use in our playbook or tasks. Follow this lab exercise to understand: - how to make use of Ansible Facts in a Playbook - how to disable gathering of facts in a Playbook - how to use Ansible variables - how to run the Ansible Ad-Hoc Command to ga...
How to Install a Linux Package Directly off the Internet - wget, yum and AHA HTML Converter
Просмотров 1,5 тыс.2 года назад
You don't have a package in your local or remote / online YUM Repositories and found it somewhere on the web. You can install by following the steps I explained in the video. Follow this lab exercise to understand: - how to download a package or a file from the Internet - how to install a package locally with the yum command without checking the configures repositories - how to install a packag...
How to Enable All Linux Yum Repositories - yum-config-manager yum repolist yum info
Просмотров 20 тыс.2 года назад
YUM Repositories are found under /etc/yum.repos.d and they are usually disabled. YUM Repos can be enabled in one go or by editing individual repo file as well. Follow thig lab exercise to understand: - how to enable a yum repo - how to disable a yum repo - how to enable all the YUM repositories in one go - how to disable all the YUM repositories in one go - how to build the local YUM repositori...
Ansible# 5 - Get help on Ansible Modules and Plugins - Online Help and Offline Help - ansible-doc
Просмотров 1842 года назад
Learning Ansible #5 In this sesion, we check out some of the best ways to get help related to Ansible modules or commands or plugins, etc. We also cover how to get help on Linux commands. We cover netstat command in contrast with telnet command which is used to check if a port or service is available, i.e. working on a remote system. All of them makes this exercise interesting. So, what are you...
Ansible# 4 - How to Write an Ansible Playbook and Check it for Syntax Errors and Capture Output
Просмотров 4752 года назад
In the previous 3 videos or lab exercises, we built our understanding of how to setup Ansible on our Linux host. Continue with this video to learn: - how to run an ad-hoc command with the command "ansible" - how to write or design an Ansible Playbook - how to specify host groups for selection to perform tasks or actions on - how to use Ansible Modules: A: command B: shell C: debug - how to regi...
How to Recreate Home Directory with Default Files and Shell Environment - mkdir and mkhomedir_helper
Просмотров 1,2 тыс.2 года назад
How to Recreate Home Directory with Default Files and Shell Environment - mkdir and mkhomedir_helper
How to Add Spare Disks and Create Satandard Partitions and Logical Volumes and Format Disks in Linux
Просмотров 2982 года назад
How to Add Spare Disks and Create Satandard Partitions and Logical Volumes and Format Disks in Linux
Ansible# 3 - Run Linux Commands on Remote Host using Ansible Ad-Hoc Commmand Modules command & shell
Просмотров 6542 года назад
Ansible# 3 - Run Linux Commands on Remote Host using Ansible Ad-Hoc Commmand Modules command & shell
Ansible# 2 - Run System Commands on Remote Hosts with Passwordless Authentication through SSH
Просмотров 3722 года назад
Ansible# 2 - Run System Commands on Remote Hosts with Passwordless Authentication through SSH
Ansible# 1 - Setup YUM Repositories to Install Ansible and Verify the Setup
Просмотров 8772 года назад
Ansible# 1 - Setup YUM Repositories to Install Ansible and Verify the Setup
How to Test a Linux Host for Internet Connectivity - Use Google's DNS Servers
Просмотров 2,7 тыс.2 года назад
How to Test a Linux Host for Internet Connectivity - Use Google's DNS Servers
How to Login to a Remote Linux Host without Entering Password without SSH Keys - sshpass
Просмотров 5742 года назад
How to Login to a Remote Linux Host without Entering Password without SSH Keys - sshpass
How to Enable Ethernet Interfaces or Add A New NIC to Linux VM and Connect to the Internet
Просмотров 2,2 тыс.2 года назад
How to Enable Ethernet Interfaces or Add A New NIC to Linux VM and Connect to the Internet
How to Disable News and Interests icon on Windows Task Bar
Просмотров 462 года назад
How to Disable News and Interests icon on Windows Task Bar
How to troubleshoot High RAM and SWAP Memory Utilisation - top, uptime, free, ps, kill, pkill, /proc
Просмотров 2 тыс.2 года назад
How to troubleshoot High RAM and SWAP Memory Utilisation - top, uptime, free, ps, kill, pkill, /proc
How to Check Disk Partitions and Mount Points - df, mount, lsblk, blkid, du, umount
Просмотров 8092 года назад
How to Check Disk Partitions and Mount Points - df, mount, lsblk, blkid, du, umount
How to Clone a VM and Export it as an Appliance for Sharing and Distributing
Просмотров 232 года назад
How to Clone a VM and Export it as an Appliance for Sharing and Distributing
How to Setup an IP on Your Linux Host - NetworkManager
Просмотров 1982 года назад
How to Setup an IP on Your Linux Host - NetworkManager
How to setup a Virtual Machine with Red Hat Enterprise Linux 8 or CentOS 8
Просмотров 7302 года назад
How to setup a Virtual Machine with Red Hat Enterprise Linux 8 or CentOS 8
How to schedule jobs in Linux - Crontab
Просмотров 1972 года назад
How to schedule jobs in Linux - Crontab

Комментарии

  • @taufiktamboli3496
    @taufiktamboli3496 9 дней назад

    thanks for this video

  • @kondalaraok4835
    @kondalaraok4835 2 месяца назад

    Great video in RUclips, please do more on real time issues

  • @daliaaltaie270
    @daliaaltaie270 5 месяцев назад

    How did you run the systemctl start sshd if you are not able to login to the server ?

  • @user-dd9zr1my1u
    @user-dd9zr1my1u 6 месяцев назад

    Useful Video

  • @abdul-razakyahaya4833
    @abdul-razakyahaya4833 7 месяцев назад

    Thumbs up.

  • @sunnybhatti9567
    @sunnybhatti9567 8 месяцев назад

    great job, bro!

  • @revanthreddyremo
    @revanthreddyremo 8 месяцев назад

    yum-config-manager -enable /* It showing command not found

    • @DevOps_
      @DevOps_ Месяц назад

      sudo yum install yum-utils

  • @f_mak007
    @f_mak007 9 месяцев назад

    In correct subject line I'm looking to print the data from one file and want to group the date by one of the field. Running different command with ; doesn't comes under grouping.

  • @sandeepbhuvad594
    @sandeepbhuvad594 10 месяцев назад

    How to install HP 1020 printer on fedora 37 os

  • @manishmunjal6339
    @manishmunjal6339 11 месяцев назад

    Its very usefull, thanks

  • @JnCrlsHrnndz
    @JnCrlsHrnndz 11 месяцев назад

    thanks!

  • @EmmanuelOgundipe
    @EmmanuelOgundipe 11 месяцев назад

    Thank you so much. This is very helpful

  • @EmmanuelOgundipe
    @EmmanuelOgundipe 11 месяцев назад

    Thank you for this

  • @devashishsingh4841
    @devashishsingh4841 Год назад

    You are killing it sir

  • @ramireddypoli8873
    @ramireddypoli8873 Год назад

    how to check logs in linux if serveris not booting

  • @VMDevTutorial
    @VMDevTutorial Год назад

    how to check complete log instead of using tail or head

  • @shaboog2644
    @shaboog2644 Год назад

    Thank you so much. I wish you gave 1 on 1 classes

  • @KrishnaKumar-ks3mj
    @KrishnaKumar-ks3mj Год назад

    Really informative video on subshells, but I got doubt when I executed on below two in different script files #!/bin/bash ( message="Variable Scope in a commands Group"; echo "using()- $SHLVL"; echo $message ) ( echo "using both ()- $SHLVL"; echo $message ) output: using()- 2 Variable Scope in a commands Group using both ()- 2 =============================================================================== #!/bin/bash { message="Variable Scope in a commands Group"; echo "using()- $SHLVL"; echo $message ; } { echo "using both {}- $SHLVL"; echo $message ; } output: using()- 2 Variable Scope in a commands Group using both {}- 2 Variable Scope in a commands Group could you please help in clearing doubts when both parenthesis and curly-braces used ?

  • @haribolanil
    @haribolanil Год назад

    You have not showed creating Nic from scratch

  • @NitishBhatt
    @NitishBhatt Год назад

    If my rhel linux server got rebooted ..how to check in logs who rebooted that and what activity he has done.

  • @NitishBhatt
    @NitishBhatt Год назад

    Awesome.. explained. Do you have telegram or whatsapp group? I want to join in

  • @chellenta1175
    @chellenta1175 Год назад

    Thank you from Russia! I was able to learn a few new useful commands, because many people make videos only commands only for beginners

  • @anjaliverma905
    @anjaliverma905 Год назад

    Sir please make a video on how to check the managed logs . U explain really good .

  • @mechmenia
    @mechmenia Год назад

    Really helpful video....Please keep it up....God bless you dear

  • @jagadeeshalapati5268
    @jagadeeshalapati5268 Год назад

    Hi, where can I find logs for password change related to su and local account for cent os 7

  • @mangoes142
    @mangoes142 Год назад

    Finally. Thanks for the video. Took me 2 hours to find this video. Thanks a lot!

  • @RishiRap
    @RishiRap Год назад

    Dude, you never explained the meaning of "$NF" in awk command.

  • @shivanshkumar2019
    @shivanshkumar2019 Год назад

    Hi...can u plz tell me how to open ansible.cfg file in Ubuntu 20.04.. i m using ansible 2.13.7 version. Hence i tried using cd /etc/ansible Then i us ls command..it shows one file ansible.cfg but when i use to go to add some content by using vi command ..there is no showing any code just sowing a readme file... Plz help me in this.

  • @sathishbandolero
    @sathishbandolero Год назад

    Useful video. Thanks for making it and sharing.

  • @lavanyabandanatham4310
    @lavanyabandanatham4310 Год назад

    Sir how we can copy files from multiple servers to local machine

  • @priya_6788
    @priya_6788 Год назад

    Hello I need to practice linux commands where I can

    • @i_sahilbhagat
      @i_sahilbhagat Год назад

      Get a ec2 terminal from aws for free post that you can practice on web browser or putty etc

  • @ilyafalaleev6196
    @ilyafalaleev6196 Год назад

    Why?

  • @sreepriyanks398
    @sreepriyanks398 Год назад

    excellent video , please make little bit more loud..kudoos

    • @DevLinux
      @DevLinux Год назад

      Hi Priyank! Thanks for sharing your thoughts. I will check the sound thing next time I record videos.

  • @anilkummitha8188
    @anilkummitha8188 Год назад

    After connecting to the Oracle (su - Oracle) which command used for to check the which DB we are in.

    • @DevLinux
      @DevLinux Год назад

      Use #ps aux | egrep -i 'pmon|cmon|db' # netstat -pan | less

  • @gyanbaba9515
    @gyanbaba9515 Год назад

    Good explanation

  • @imrankhan-uh4lr
    @imrankhan-uh4lr Год назад

    this is very useful brother keep it up.

    • @DevLinux
      @DevLinux Год назад

      Thanks for your comment!

  • @DOGEME
    @DOGEME 2 года назад

    *spoiler* ruclips.net/video/M_1BjNPbik8/видео.html

  • @DevLinux
    @DevLinux 2 года назад

    Note: We can specify some hosts dynamically (add_hosts) in a playbook, however, Ansible requires that inventory file is specified even before a playbook is executed. Hence, we can specify it in the anscile.cfg file or we can use the "-i" option and specify the inventory file.

  • @DevLinux
    @DevLinux 2 года назад

    Though I said that I would make it short, I still ended up making it about 30+ min long. :)

  • @stanstanislas-lr8pv
    @stanstanislas-lr8pv 2 года назад

    Hello sir , i wish you could help me out with a video on how to restore my home directory (kali linux).

    • @DevLinux
      @DevLinux 2 года назад

      Hi, Stan! Check the Skeleton directory under "/etc/skel". An example is given below: # ls -la /etc/skel drwxr-xr-x. 2 root root 62 Apr 11 2018 . drwxr-xr-x. 91 root root 8192 May 31 23:43 .. -rw-r--r--. 1 root root 18 Oct 30 2018 .bash_logout -rw-r--r--. 1 root root 193 Oct 30 2018 .bash_profile -rw-r--r--. 1 root root 231 Oct 30 2018 .bashrc ---------------- Create the home direcoty and copy the contents of the above dirctory inside the user's home directory. Next, given ownership to the user by running this command: # chown -R userName:GroupName /home/userName Please note that group name can be the same as the user name. You need to be the root user to perform the above steps. If you still get stuck, we can have a Skype session and check it. My Skype Profile: join.skype.com/invite/UTTOpoDVsNyR

  • @hemantgangwar1246
    @hemantgangwar1246 2 года назад

    Good one Devarishi. A like already given. Keep going.

    • @DevLinux
      @DevLinux 2 года назад

      Thank you, brother!

  • @ramchandramishra102
    @ramchandramishra102 2 года назад

    Very informative 😊

    • @DevLinux
      @DevLinux 2 года назад

      Glad it was helpful!

  • @yeshlenchetty9173
    @yeshlenchetty9173 2 года назад

    Thank you, you just clarified something which I thought was difficult and made it easy to understand! Greetings from South Africa!

    • @DevLinux
      @DevLinux 2 года назад

      Thanks for watching the video! Please, subscribe to the channel and also share with your friends and peers.

  • @Pervy
    @Pervy 3 года назад

    very nice

  • @Pervy
    @Pervy 3 года назад

    this is really good thx

  • @vamsikrishna8703
    @vamsikrishna8703 3 года назад

    THank you sir for detailing us to use shift operator in unix

    • @DevLinux
      @DevLinux 3 года назад

      I am glad to know that you found it helpful. Please, do subscribe to my channel! :)

  • @gyanbaba9515
    @gyanbaba9515 3 года назад

    playing nicely with the scripting and point to point knowledge......

    • @DevLinux
      @DevLinux 3 года назад

      I am glad to know that you found it helpful. Post any question you might have.

  • @kalyankalapala8940
    @kalyankalapala8940 3 года назад

    Brilliant. Thank u so much for making this to learn with ease where other blogs and channels are making to confused of this concept

    • @DevLinux
      @DevLinux 3 года назад

      I am glad to know that you found the video tutorial easy to follow. Please, do subscribe to my channel! :)

  • @jasons1856
    @jasons1856 4 года назад

    Great video. Very easily understood.

    • @DevLinux
      @DevLinux 3 года назад

      Thank you, Jason! Please, do subscribe to my channel! :)

  • @mohsenbaranizade9020
    @mohsenbaranizade9020 4 года назад

    create explanation! good job. thanks

    • @DevLinux
      @DevLinux 3 года назад

      Glad you enjoyed it! Please, do subscribe to my channel! :)