(1)You can activate your privilege escalations using which settings?
(i)become=true
(ii)become=false
Answer is :- (i) become=true
(2)ansible.cfg should be present in
(i)/ansible/
(ii)/etc/hosts
(iii)/etc/ansible
(iv)/etc/configurations
Answer is :- (iii)/etc/ansible
(3)To store sensitive information you can use ansible-vaulte.
(i)True
(ii)False
Answer is :- i)True
(4)Which module will you use to create a directory?
(i)file
(ii)fetch
(iii)copy
(iv)template
Answer is :- (i)file
(5)Ansible has two type of servers
(i)Only node
(ii)controlling machines & nodes
Answer is :- (i)Only node
(6)What is the output statement of the following snippet?
tasks:
- name: test
shell: echo "hello"
register: a
debug: msg="the message is {{ a.stdout }}"
(i)the message is hello will get printed without any errors
(ii)syntax error because of conflicting action statements
Answer is :- (ii)syntax error because of conflicting action statements
(7)How can you reduce the number of SSH connections required?
(i)forks
(ii)pipelining
(iii)accelerate_port
(iv)become_method
Answer is :- (ii)pipelining
(8)You write comments in Jinja2 as:
(i){{ }}
(ii){# #}
(iii){% %}
Answer is :- (ii){# #}
(9)Which module can be used to copy files from remote machine to control machine?
(i)copy
(ii)move
(iii)ping
(iv)fetch
Answer is:- (ii)move
(10)what is the default forks value in configuration file?
(i)depends upon hosts in inventory
(ii)7
(iii)1
(iv)5
Answer is :- (iv)5
(11)Which command tells ansible to run the playbook on all the hosts except host1?
(i)ansible-playbook playbooks/PLAYBOOK_NAME.yml --limit "all:!host1"
(ii)ansible-playbook playbooks/PLAYBOOK_NAME.yml --limit 'all:!host1'
(iii)ansible-playbook playbooks/PLAYBOOK_NAME.yml --limit "!host1"
(iv)ansible-playbook playbooks/PLAYBOOK_NAME.yml -limit 'all:!host1'
answer is :- (ii)ansible-playbook playbooks/PLAYBOOK_NAME.yml --limit 'all:!host1'
(12)Ansible can deploy to virtualization and cloud environments, Including
(i)Cloud Stack
(ii)Google cloud platform
(iii)All the Options
(iv)Amazon web services
(v)Open Stack
Answer is :- (iii)All the Options
(13)YAML uses tabs for indentation, True or false?
(i)True
(ii)False
Answer is :- (ii)False
(14)Using which module can you see the list of all the ansible variables?
(i)ping
(ii)fetch
(iii)setup
(iv)copy
Answer:- (iii)setup
(15)Which configuration management software is Agentless?
(i)CFEngine
(ii)Puppet
(iii)Ansible
(iv)Chef
Answer is :- (iii)Ansible
(16)Ansible is
(i)All the options mentioned
(ii)Orchestration Engine
(iii)configuration management
(iv)Infrastructure as Code
Answer is :- (i)All the options mentioned
(17)Which Ansible module is used to manage docker services and containers.
(i)docker_login
(ii)docker_container
(iii)docker
(iv)docker_service
Answer is :- (iv)docker_service
(18)How to define the number of parallel processes while communicating to remote hosts?
(i)become
(ii)forks
(iii)pipelining
(iv)become_method
Answer is :- (ii)forks
(19)Ansible can work as a push automated deployment system and as well as a pull automated deployment system?
(i)True
(ii)False
Answer is:- (i)True
(20)Which of the following is a valid YAML syntax?
(i)path: F:\test
(ii)All the options mentioned
(iii)path: F:
(iv)path: "F\test"\programs
Correct answer is :- (i)path: F:\test