in Technology by
What is the ad-hoc command in Ansible?

1 Answer

0 votes
by

Ad-hoc commands are like one-line playbooks to perform a specific task only. The syntax for the ad-hoc command is

ansible [pattern] -m [module] -a "[module options]"

For example, we need to reboot all servers in the staging group

ansible atlanta -a "/sbin/reboot"  -u username --become [--ask-become-pass]

Related questions

0 votes
    What is meant by Ad-Hoc commands? Give one example....
asked Jan 28, 2023 in Technology by JackTerrance
0 votes
    The ws-discovery specifications explains how to protect your network from message alteration Denial of service replay ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    What is the function used to stop capturing the ad hoc timing ? (a) stopadhoc() (b) stopTimer() ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which of the following is used to run ad hoc R commands? (a) R Console (b) R Primer (c) ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    Which command tells ansible to run the playbook on all the hosts except host1? (i)ansible-playbook playbooks/ ... ansible-playbook playbooks/PLAYBOOK_NAME.yml -limit 'all:!host1'...
asked Jan 25, 2023 in Technology by JackTerrance
0 votes
    Which of the following platforms can be used by advertisers to bid and purchase ad impressions across ad exchanges? Ad network Demand Side Platform Supply Side Platform...
asked Sep 5, 2021 in Technology by JackTerrance
0 votes
    If the AD B2B account is e-reference, can an admin block this? Could an admin prevent their users from being guest users in another tenant?...
asked Mar 10, 2021 in Technology by JackTerrance
0 votes
    I made an application in react and i'm using ADAL to authenticate in Azure Active Directory, so every ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I tried to set the adListener for Interstitial Ad but it doesn't work (AdMob + Kotlin - Mobile ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    I am wrapping an AdManagerAdView in an AndroidView so I can use it in Jetpack Compose. The image fails ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    Your client noticed last month that his ad is often shown next to another advertiser's ad for the same search ... to other advertisers? Select the correct answer from above options...
asked Dec 1, 2021 in Education by JackTerrance
0 votes
    The relation AD - BC = 1, (where A, B, C and D are the elements of a transmission matrix of a network ... Questions for GATE EC Exam, Network Theory MCQ (Multiple Choice Questions)...
asked Oct 13, 2021 in Education by JackTerrance
0 votes
    What are the components of Ansible?...
asked Jan 29, 2023 in Technology by JackTerrance
0 votes
    What is Ansible pipelining?...
asked Jan 29, 2023 in Technology by JackTerrance
0 votes
    What is use of Ansible?...
asked Jan 29, 2023 in Technology by JackTerrance
...