Online Exam Quiz

questionQuestion  1 to 30

How do you run a task with elevated privileges in Ansible?

  • Using the become directive
  • Using the sudo directive
  • Using the elevate directive
  • Using the root directive
Mark for review

How can you include another playbook in your current playbook?

  • Using the include directive
  • Using the import_playbook directive
  • Using the import directive
  • Using the add_playbook directive
Mark for review

Which module is used to manage service states in Ansible?

  • service
  • systemd
  • service_manager
  • sys_service
Mark for review

How do you specify an alternative Ansible configuration file?

  • Using the -c option
  • Using the -f option
  • Using the -e option
  • Using the -i option
Mark for review

Which command runs an Ansible playbook with increased verbosity?

  • ansible-playbook -v
  • ansible-playbook -vv
  • ansible-playbook -vvv
  • ansible-playbook -vvvv
Mark for review

How can you debug tasks in Ansible?

  • Using the debug module
  • Using the print module
  • Using the log module
  • Using the message module
Mark for review

What is the purpose of the gather_facts directive in Ansible?

  • To collect information about the managed hosts
  • To gather module facts
  • To gather playbook facts
  • To gather role facts
Mark for review

Which module is used to manage firewalld in Ansible?

  • firewalld
  • firewall
  • iptables
  • firewall_manage
Mark for review

Which module is used to manage host files in Ansible?

  • hosts
  • hostname
  • hostfile
  • host
Mark for review

What is the primary use of the ansible-galaxy command?

  • To manage roles
  • To manage playbooks
  • To manage modules
  • To manage inventory
Mark for review

How do you specify the inventory file to use with Ansible?

  • Using the -i option
  • Using the -f option
  • Using the -e option
  • Using the -a option
Mark for review

Which command is used to create a new Ansible playbook?

  • ansible-playbook create
  • ansible-playbook new
  • ansible-playbook init
  • ansible-playbook
Mark for review

What is the ansible-vault command used for?

  • To encrypt and decrypt sensitive data
  • To vault playbooks
  • To vault roles
  • To vault modules
Mark for review

How do you define variables in an Ansible playbook?

  • Using the vars directive
  • Using the variables directive
  • Using the set directive
  • Using the define directive
Mark for review

Which module is used to manage SELinux state in Ansible?

  • selinux
  • seboolean
  • sefcontext
  • semanage
Mark for review

What is the default location for the Ansible hosts file?

  • /etc/ansible/hosts
  • /usr/local/ansible/hosts
  • /var/ansible/hosts
  • /etc/hosts/ansible
Mark for review

Which module would you use to execute a shell command in Ansible?

  • command
  • shell
  • execute
  • run
Mark for review

What does the delegate_to directive do in Ansible?

  • Delegates a task to a specific host
  • Delegates a playbook to a specific role
  • Delegates an inventory to a specific group
  • Delegates a role to a specific playbook
Mark for review

What is the purpose of the ansible-config command?

  • To view and edit Ansible configuration
  • To view the configuration of managed nodes
  • To test Ansible configuration
  • To validate Ansible playbooks
Mark for review

Which module is used to install Python packages in Ansible?

  • pip
  • python
  • pip_install
  • package
Mark for review

How do you specify a remote user for Ansible to connect as?

  • Using the remote_user directive
  • Using the user directive
  • Using the ssh_user directive
  • Using the connect_user directive
Mark for review

How can you limit Ansible tasks to specific hosts?

  • Using hosts: directive
  • Using tasks: directive
  • Using limit: directive
  • Using roles: directive
Mark for review

How do you install a package using Ansible?

  • Using the yum module
  • Using the package module
  • Using the install module
  • Using the apt module
Mark for review

What is the purpose of the become directive in Ansible?

  • To switch to a different user
  • To escalate privileges
  • To change the playbook owner
  • To add a new host
Mark for review

Which module is used to manage packages with yum in Ansible?

  • yum
  • package
  • rpm
  • yum_package
Mark for review

Which module is used to manage systemd services in Ansible?

  • systemd
  • service
  • sysd
  • sysv
Mark for review

Which command is used to check the connectivity between the control node and managed nodes in Ansible?

  • ansible -m ping all
  • ansible -ping
  • ansible -test
  • ansible -connect
Mark for review

How can you run Ansible playbooks in parallel?

  • Using the forks parameter in the configuration
  • Using the parallel directive
  • Using the async directive
  • Using the concurrency directive
Mark for review

What is the purpose of the ansible-vault rekey command?

  • To change the password of an encrypted file
  • To decrypt an encrypted file
  • To encrypt a file with a new password
  • To vault a new file
Mark for review

How can you override variables in Ansible?

  • Using the vars directive in the playbook
  • Using the vars directive in the role
  • Using the set_fact directive
  • Using the override directive
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review