One of the best videos regarding Ansible usage on internet
@roya20454 жыл бұрын
Hi the ansible playbook structure/spacing or what its called as indentation is this structure common on all playbooks that is written or does it change. Its bit confusing where and when to use spaces & hyphens in a playbook. I am not from a coding or developer background hence it becomes more confusing is there a editor to automatically take the spacing & hyphens when writing the playbook. Can you make a video on how to structure the playbook step by step.Kindly reply
@technotesofhemant83384 жыл бұрын
Sure I will try to make one on that. Still for a general understanding we use hyphen (-) at 3 major places: 1. Starting of playbook either in name of play or you with hosts directly. 2. Starting the tasks , again in providing their name or directly with module one is using. 3. While defining more than one values as input to keep them at same indentation. This can be used to provide more than one value or dealing with one or more conditions. Now regarding to indentation, I use single rule that what is the scope of the parameter we are dealing with. For ex, an attribute of a module will always have more spaces than the module itself. At same place the conditions applied on task will have same indentation as that of module as that will affect module behaviour. Hopefully I made sense and it is helpful for you. You can always connect with us for any queries. If you like the videos , please like share and subscribe.
@kingroc36513 жыл бұрын
The async and poll error is because the indent!
@puneetgupta86864 жыл бұрын
Love you bro nice thing you are doing keep it up
@technotesofhemant83384 жыл бұрын
Thank you so much 😀
@priyankahemantgangwar28004 жыл бұрын
Great concept and content
@technotesofhemant83384 жыл бұрын
Thanks
@ManpreetSingh-xq3dp Жыл бұрын
How are the packages are fetching for next patching cycle
@ManpreetSingh-xq3dp Жыл бұрын
Whether we need to enable any repository as well in the master server
@technotesofhemant8338 Жыл бұрын
Not actually
@santoshdegil48802 жыл бұрын
It is really helpful. I need one more help on this check if you can provide. I have different packages to exclude for every server, is there any way instead of adding that package name in file we can in put that package name while executing playbook.
@technotesofhemant83382 жыл бұрын
Thank you very much for your comment. Now coming to your additional feature, I suggest put a variable in place of exclude package name. Then make use of hostvars/groupvars approach to provide value for that variable against each server or for a server group.