SlideShare a Scribd company logo
Redhat EX407 Exam
Volume: 76 Questions + 13 Labs
Question: 1
Which command will use servers in a local inventory called invent.local
Choose the correct answer:
A. ansible servers -m ping
B. ansible all -m ping
C. ansible all -m ping -i invent.local
D. ansible all -m ping -f invent.local
Answer: C
Question: 2
You are taking over for someone while they are away on leave. You need to run a playbook
against over 600 servers. When you run the playbook you notice that only 10 servers are worked
on at any one time. How would you fix this so that you can have 50 servers worked on at the
same time?
Choose the correct answer:
A. Edit the /etc/ansible/ansible.cfg file and adjust the 'poll_interval' parameter.
B. Edit the /etc/ansible/hosts file and adjust the 'forks' parameter.
C. Edit the /etc/ansible/servers file and adjust the 'servers' parameter
D. Edit the /etc/ansible/ansible.cfg file and adjust the 'forks' parameter.
Answer: D
Explanation:
The forks parameter adjust the parallelism of the ansible commands.
Question: 3
Ansible expects templates to use json format.
Choose the correct answer:
Redhat EX407 Exam
A. True
B. False
Answer: B
Explanation:
They don't use json format.
Question: 4
A template has a maximum of 10 variables.
Choose the correct answer:
A. True
B. False
Answer: B
Question: 5
Will this command use servers in a local inventory called invent.local?
ansible all -m ping -i invent.local Choose the correct answer:
A. True
B. False
Answer: A
Question: 6
Is this the correct format for an ansible ad-hoc command?
ansible servers -m ping Choose the correct answer:
A. True
B. False
Answer: A
Redhat EX407 Exam
Question: 7
A template has a maximum of 10 variables.
Choose the correct answer:
A. True
B. False
Answer: B
Explanation:
The No is much higher.
Question: 8
The command ansible-galaxy init wont create the file structure you need for roles.
Choose the correct answer:
A. True
B. False
Answer: B
Explanation:
It will create the correct structure for you.
Question: 9
The correct structure for use with roles has the various portions of the role under a central folder.
e.g if the role is called apache then the location of the tasks would be the following:
apache - tasks - main.yml Choose the correct answer:
A. True
B. False
Answer: A
Explanation:
This is the format for the file system used for roles: project/ ├── defaults │ └── main.yml ├──
Redhat EX407 Exam
files ├── handlers │ └── main.yml ├── meta │ └── main.yml ├── README.md ├── tasks │
└── main.yml ├── templates ├── tests │ ├── inventory │ └── test.yml └── vars └──
main.yml
Question: 10
Which of these are valid as the first thing in a playbook?
Choose the 2 correct answers:
A. ---
B. - tasks: name=
C. --- # this is a comment
D. - hosts: local
Answer: AC
Question: 11
You can change the no of forks ansible uses from the /etc/ansible/ansible.cfg file.
Choose the correct answer:
A. True
B. False
Answer: A
Explanation:
/etc/ansible/ansible.cfg file is the default location of the configuration file.
Question: 12
The following command can be used to filter facts to pull out the ip address for the target host.
ansible local -m setup -a "filter=ansible_default_ipv4"
Choose the correct answer:
A. True
B. False
Redhat EX407 Exam
Answer: A
Question: 13
A template can only use 1 variable
Choose the correct answer:
A. True
B. False
Answer: B
Explanation:
You can use multiple variables in templates
Question: 14
The following is allowed in a playbook.
---
- tasks: yaml: name=yum.
- hosts: local
Choose the correct answer:
A. True
B. False
Answer: B
Explanation:
Order is --- - hosts: local must be first.
Question: 15
If you create your own ansible facts file, it can be executable.
Choose the correct answer:
A. True
B. False
Answer: A
Redhat EX407 Exam
Ansible tower can be used to manage your ansible systems.
Choose the correct answer:
A. True
B. False
Answer: A
Question: 76
There is a 10 user trial available.
Choose the correct answer:
A. True
B. False
Answer: A
Lab1. Ad-hoc Ansible Commands (Number One)
Task:
1. Use an ansible ad-hoc command, check the connectivity of your servers.
2. Use an ad-hoc ansible command, find the free space of your servers.
3. Use an ad-hoc ansible command, find out the memory usage of your servers.
4. Do an ls -l on the targets /var/log/messages file.
5. Tail the contents of the targets /var/log/messages file.
Solution:
1. ansible all -m ping
2. ansible all -a "/bin/df -h"
3. ansible all -a "/usr/bin/free"
4. ansible all -a "ls -l /var/log/messages"
5. ansible local -b -a "tail /var/log/messages"
Redhat EX407 Exam
Lab2. Ad-Hoc Ansible Commands (Number Two)
Task:
1. Use the ad-hoc command to make sure php is installed.
2. Use the ad-hoc command to make sure that php is installed and is the latest version.
3. Use the ad-hoc command to make sure that httpd is installed.
4. Use the ad-hoc command to remove httpd from the servers.
Solution:
1. ansible all -b -m yum -a 'name=php state=present'
2. ansible all -b -m yum -a 'name=php state=latest'
3. ansible all -b -m yum -a 'name=httpd state=latest'
4. ansible all -b -m yum -a 'name=httpd state=absent'
Lab3. Static Inventories
Task:
1. Add a new group to your default ansible host file. call the group [ec2]
2. Add a new host to the new group you created.
3. Add a variable to a new host entry in the /etc/ansible/hosts file. Add the following.
localhost http_port=80 maxRequestsPerChild=808
4. Check to see if maxRequestsPerChild is pulled out with an ad-hoc command.
5. Create a local host file and put a target group and then a host into it. Then ping it with an
ad-hoc command.
Solution:
1. Edit the /etc/ansible/hosts file. Add a group.
2. Edit the /etc/ansible/hosts file. Add a user under the group you created.
3. Edit the /etc/ansible/hosts file. Find a host. if we add a variable called
maxRequestsPerChild to the host it would look like this.
host1 maxRequestsPerChild=808
4. ansible ec2 -m shell -a "echo {{ maxRequestsPerChild }}"
5. Edit a local file. It could be called anything. Lets call it myhosts. Inside the file it would
have a host like the following.
[mygroup]
myusername1.mylabserver.com

More Related Content

What's hot

Introduction to Ansible (Pycon7 2016)
Introduction to Ansible (Pycon7 2016)Introduction to Ansible (Pycon7 2016)
Introduction to Ansible (Pycon7 2016)
Ivan Rossi
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with Ansible
Ivan Serdyuk
 
Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.
Łukasz Proszek
 
Ansible best practices
Ansible best practicesAnsible best practices
Ansible best practices
StephaneFlotat1
 
Ansible : what's ansible & use case by REX
Ansible :  what's ansible & use case by REXAnsible :  what's ansible & use case by REX
Ansible : what's ansible & use case by REX
Saewoong Lee
 
taddm
taddmtaddm
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptopVagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptop
Lorin Hochstein
 
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Martin Etmajer
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with Augeas
Puppet
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
andymccurdy
 
10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPS
Paolo Tonin
 
Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013
Puppet
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)
Soshi Nemoto
 
Controlling multiple VMs with the power of Python
Controlling multiple VMs with the power of PythonControlling multiple VMs with the power of Python
Controlling multiple VMs with the power of Python
Yurii Vasylenko
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestration
Paolo Tonin
 
Using Ansible Dynamic Inventory with Amazon EC2
Using Ansible Dynamic Inventory with Amazon EC2Using Ansible Dynamic Inventory with Amazon EC2
Using Ansible Dynamic Inventory with Amazon EC2
Brian Schott
 
Deploying Symfony2 app with Ansible
Deploying Symfony2 app with AnsibleDeploying Symfony2 app with Ansible
Deploying Symfony2 app with Ansible
Roman Rodomansky
 
Vagrant + Rouster at salesforce.com - PuppetConf 2013
Vagrant + Rouster at salesforce.com - PuppetConf 2013Vagrant + Rouster at salesforce.com - PuppetConf 2013
Vagrant + Rouster at salesforce.com - PuppetConf 2013
Puppet
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Puppet
 
Continuous infrastructure testing
Continuous infrastructure testingContinuous infrastructure testing
Continuous infrastructure testing
Daniel Paulus
 

What's hot (20)

Introduction to Ansible (Pycon7 2016)
Introduction to Ansible (Pycon7 2016)Introduction to Ansible (Pycon7 2016)
Introduction to Ansible (Pycon7 2016)
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with Ansible
 
Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.
 
Ansible best practices
Ansible best practicesAnsible best practices
Ansible best practices
 
Ansible : what's ansible & use case by REX
Ansible :  what's ansible & use case by REXAnsible :  what's ansible & use case by REX
Ansible : what's ansible & use case by REX
 
taddm
taddmtaddm
taddm
 
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptopVagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptop
 
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with Augeas
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPS
 
Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)
 
Controlling multiple VMs with the power of Python
Controlling multiple VMs with the power of PythonControlling multiple VMs with the power of Python
Controlling multiple VMs with the power of Python
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestration
 
Using Ansible Dynamic Inventory with Amazon EC2
Using Ansible Dynamic Inventory with Amazon EC2Using Ansible Dynamic Inventory with Amazon EC2
Using Ansible Dynamic Inventory with Amazon EC2
 
Deploying Symfony2 app with Ansible
Deploying Symfony2 app with AnsibleDeploying Symfony2 app with Ansible
Deploying Symfony2 app with Ansible
 
Vagrant + Rouster at salesforce.com - PuppetConf 2013
Vagrant + Rouster at salesforce.com - PuppetConf 2013Vagrant + Rouster at salesforce.com - PuppetConf 2013
Vagrant + Rouster at salesforce.com - PuppetConf 2013
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
 
Continuous infrastructure testing
Continuous infrastructure testingContinuous infrastructure testing
Continuous infrastructure testing
 

Similar to Ex407

Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam QuestionsRed Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Study Material
 
Ansible ex407 and EX 294
Ansible ex407 and EX 294Ansible ex407 and EX 294
Ansible ex407 and EX 294
IkiArif1
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetup
Greg DeKoenigsberg
 
Unit Testing Lots of Perl
Unit Testing Lots of PerlUnit Testing Lots of Perl
Unit Testing Lots of Perl
Workhorse Computing
 
Ansible Devops North East - slides
Ansible Devops North East - slides Ansible Devops North East - slides
Ansible Devops North East - slides
InfinityPP
 
LVM QUESTION.docx
LVM QUESTION.docxLVM QUESTION.docx
LVM QUESTION.docx
VikrantSChohaan
 
Learning Puppet basic thing
Learning Puppet basic thing Learning Puppet basic thing
Learning Puppet basic thing
DaeHyung Lee
 
Introducing Ansible
Introducing AnsibleIntroducing Ansible
Introducing Ansible
Francesco Pantano
 
Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)
Jude A. Goonawardena
 
Ansible with oci
Ansible with ociAnsible with oci
Ansible with oci
DonghuKIM2
 
DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!
Jeff Geerling
 
Quize on scripting shell
Quize on scripting shellQuize on scripting shell
Quize on scripting shell
lebse123
 
Scaling to-5000-nodes
Scaling to-5000-nodesScaling to-5000-nodes
Scaling to-5000-nodes
Philip Watts
 
Puppet Camp New York 2015: Puppet Enterprise Scaling Lessons Learned (Interme...
Puppet Camp New York 2015: Puppet Enterprise Scaling Lessons Learned (Interme...Puppet Camp New York 2015: Puppet Enterprise Scaling Lessons Learned (Interme...
Puppet Camp New York 2015: Puppet Enterprise Scaling Lessons Learned (Interme...
Puppet
 
introducing-ansible
introducing-ansibleintroducing-ansible
introducing-ansible
David Heidt
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done right
Dan Vaida
 
Ansible
AnsibleAnsible
Ansible
Rahul Bajaj
 
playbooks.pptx
playbooks.pptxplaybooks.pptx
playbooks.pptx
BaskarKannanK
 
A tour of Ansible
A tour of AnsibleA tour of Ansible
A tour of Ansible
DevOps Ltd.
 
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docx
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docxLab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docx
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docx
DIPESH30
 

Similar to Ex407 (20)

Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam QuestionsRed Hat Certified Engineer (RHCE) EX294 Exam Questions
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
 
Ansible ex407 and EX 294
Ansible ex407 and EX 294Ansible ex407 and EX 294
Ansible ex407 and EX 294
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetup
 
Unit Testing Lots of Perl
Unit Testing Lots of PerlUnit Testing Lots of Perl
Unit Testing Lots of Perl
 
Ansible Devops North East - slides
Ansible Devops North East - slides Ansible Devops North East - slides
Ansible Devops North East - slides
 
LVM QUESTION.docx
LVM QUESTION.docxLVM QUESTION.docx
LVM QUESTION.docx
 
Learning Puppet basic thing
Learning Puppet basic thing Learning Puppet basic thing
Learning Puppet basic thing
 
Introducing Ansible
Introducing AnsibleIntroducing Ansible
Introducing Ansible
 
Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)Introduction to Ansible - (dev ops for people who hate devops)
Introduction to Ansible - (dev ops for people who hate devops)
 
Ansible with oci
Ansible with ociAnsible with oci
Ansible with oci
 
DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!
 
Quize on scripting shell
Quize on scripting shellQuize on scripting shell
Quize on scripting shell
 
Scaling to-5000-nodes
Scaling to-5000-nodesScaling to-5000-nodes
Scaling to-5000-nodes
 
Puppet Camp New York 2015: Puppet Enterprise Scaling Lessons Learned (Interme...
Puppet Camp New York 2015: Puppet Enterprise Scaling Lessons Learned (Interme...Puppet Camp New York 2015: Puppet Enterprise Scaling Lessons Learned (Interme...
Puppet Camp New York 2015: Puppet Enterprise Scaling Lessons Learned (Interme...
 
introducing-ansible
introducing-ansibleintroducing-ansible
introducing-ansible
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done right
 
Ansible
AnsibleAnsible
Ansible
 
playbooks.pptx
playbooks.pptxplaybooks.pptx
playbooks.pptx
 
A tour of Ansible
A tour of AnsibleA tour of Ansible
A tour of Ansible
 
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docx
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docxLab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docx
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docx
 

Recently uploaded

一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
u2cz10zq
 
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
afkxen
 
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
78tq3hi2
 
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
g1inbfro
 
Here's Why Every Semi-Truck Should Have ELDs
Here's Why Every Semi-Truck Should Have ELDsHere's Why Every Semi-Truck Should Have ELDs
Here's Why Every Semi-Truck Should Have ELDs
jennifermiller8137
 
EV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker JamiesonEV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker Jamieson
Forth
 
Catalytic Converter theft prevention - NYC.pptx
Catalytic Converter theft prevention - NYC.pptxCatalytic Converter theft prevention - NYC.pptx
Catalytic Converter theft prevention - NYC.pptx
Blue Star Brothers
 
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
MarynaYurchenko2
 
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
afkxen
 
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
utuvvas
 
Expanding Access to Affordable At-Home EV Charging by Vanessa Warheit
Expanding Access to Affordable At-Home EV Charging by Vanessa WarheitExpanding Access to Affordable At-Home EV Charging by Vanessa Warheit
Expanding Access to Affordable At-Home EV Charging by Vanessa Warheit
Forth
 
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
78tq3hi2
 
Charging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
Charging and Fueling Infrastructure Grant: Round 2 by Brandt HertensteinCharging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
Charging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
Forth
 
Charging Fueling & Infrastructure (CFI) Program by Kevin Miller
Charging Fueling & Infrastructure (CFI) Program  by Kevin MillerCharging Fueling & Infrastructure (CFI) Program  by Kevin Miller
Charging Fueling & Infrastructure (CFI) Program by Kevin Miller
Forth
 
EV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin DonnellyEV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin Donnelly
Forth
 
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
ggany
 
Dahua Security Camera System Guide esetia
Dahua Security Camera System Guide esetiaDahua Security Camera System Guide esetia
Dahua Security Camera System Guide esetia
Esentia Systems
 
Charging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
Charging Fueling & Infrastructure (CFI) Program Resources by Cat PleinCharging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
Charging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
Forth
 

Recently uploaded (18)

一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
 
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
一比一原版(WashU文凭证书)圣路易斯华盛顿大学毕业证如何办理
 
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
原版制作(Exeter毕业证书)埃克塞特大学毕业证完成信一模一样
 
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
 
Here's Why Every Semi-Truck Should Have ELDs
Here's Why Every Semi-Truck Should Have ELDsHere's Why Every Semi-Truck Should Have ELDs
Here's Why Every Semi-Truck Should Have ELDs
 
EV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker JamiesonEV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker Jamieson
 
Catalytic Converter theft prevention - NYC.pptx
Catalytic Converter theft prevention - NYC.pptxCatalytic Converter theft prevention - NYC.pptx
Catalytic Converter theft prevention - NYC.pptx
 
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
 
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
 
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
 
Expanding Access to Affordable At-Home EV Charging by Vanessa Warheit
Expanding Access to Affordable At-Home EV Charging by Vanessa WarheitExpanding Access to Affordable At-Home EV Charging by Vanessa Warheit
Expanding Access to Affordable At-Home EV Charging by Vanessa Warheit
 
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
 
Charging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
Charging and Fueling Infrastructure Grant: Round 2 by Brandt HertensteinCharging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
Charging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
 
Charging Fueling & Infrastructure (CFI) Program by Kevin Miller
Charging Fueling & Infrastructure (CFI) Program  by Kevin MillerCharging Fueling & Infrastructure (CFI) Program  by Kevin Miller
Charging Fueling & Infrastructure (CFI) Program by Kevin Miller
 
EV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin DonnellyEV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin Donnelly
 
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
 
Dahua Security Camera System Guide esetia
Dahua Security Camera System Guide esetiaDahua Security Camera System Guide esetia
Dahua Security Camera System Guide esetia
 
Charging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
Charging Fueling & Infrastructure (CFI) Program Resources by Cat PleinCharging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
Charging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
 

Ex407

  • 1. Redhat EX407 Exam Volume: 76 Questions + 13 Labs Question: 1 Which command will use servers in a local inventory called invent.local Choose the correct answer: A. ansible servers -m ping B. ansible all -m ping C. ansible all -m ping -i invent.local D. ansible all -m ping -f invent.local Answer: C Question: 2 You are taking over for someone while they are away on leave. You need to run a playbook against over 600 servers. When you run the playbook you notice that only 10 servers are worked on at any one time. How would you fix this so that you can have 50 servers worked on at the same time? Choose the correct answer: A. Edit the /etc/ansible/ansible.cfg file and adjust the 'poll_interval' parameter. B. Edit the /etc/ansible/hosts file and adjust the 'forks' parameter. C. Edit the /etc/ansible/servers file and adjust the 'servers' parameter D. Edit the /etc/ansible/ansible.cfg file and adjust the 'forks' parameter. Answer: D Explanation: The forks parameter adjust the parallelism of the ansible commands. Question: 3 Ansible expects templates to use json format. Choose the correct answer:
  • 2. Redhat EX407 Exam A. True B. False Answer: B Explanation: They don't use json format. Question: 4 A template has a maximum of 10 variables. Choose the correct answer: A. True B. False Answer: B Question: 5 Will this command use servers in a local inventory called invent.local? ansible all -m ping -i invent.local Choose the correct answer: A. True B. False Answer: A Question: 6 Is this the correct format for an ansible ad-hoc command? ansible servers -m ping Choose the correct answer: A. True B. False Answer: A
  • 3. Redhat EX407 Exam Question: 7 A template has a maximum of 10 variables. Choose the correct answer: A. True B. False Answer: B Explanation: The No is much higher. Question: 8 The command ansible-galaxy init wont create the file structure you need for roles. Choose the correct answer: A. True B. False Answer: B Explanation: It will create the correct structure for you. Question: 9 The correct structure for use with roles has the various portions of the role under a central folder. e.g if the role is called apache then the location of the tasks would be the following: apache - tasks - main.yml Choose the correct answer: A. True B. False Answer: A Explanation: This is the format for the file system used for roles: project/ ├── defaults │ └── main.yml ├──
  • 4. Redhat EX407 Exam files ├── handlers │ └── main.yml ├── meta │ └── main.yml ├── README.md ├── tasks │ └── main.yml ├── templates ├── tests │ ├── inventory │ └── test.yml └── vars └── main.yml Question: 10 Which of these are valid as the first thing in a playbook? Choose the 2 correct answers: A. --- B. - tasks: name= C. --- # this is a comment D. - hosts: local Answer: AC Question: 11 You can change the no of forks ansible uses from the /etc/ansible/ansible.cfg file. Choose the correct answer: A. True B. False Answer: A Explanation: /etc/ansible/ansible.cfg file is the default location of the configuration file. Question: 12 The following command can be used to filter facts to pull out the ip address for the target host. ansible local -m setup -a "filter=ansible_default_ipv4" Choose the correct answer: A. True B. False
  • 5. Redhat EX407 Exam Answer: A Question: 13 A template can only use 1 variable Choose the correct answer: A. True B. False Answer: B Explanation: You can use multiple variables in templates Question: 14 The following is allowed in a playbook. --- - tasks: yaml: name=yum. - hosts: local Choose the correct answer: A. True B. False Answer: B Explanation: Order is --- - hosts: local must be first. Question: 15 If you create your own ansible facts file, it can be executable. Choose the correct answer: A. True B. False Answer: A
  • 6. Redhat EX407 Exam Ansible tower can be used to manage your ansible systems. Choose the correct answer: A. True B. False Answer: A Question: 76 There is a 10 user trial available. Choose the correct answer: A. True B. False Answer: A Lab1. Ad-hoc Ansible Commands (Number One) Task: 1. Use an ansible ad-hoc command, check the connectivity of your servers. 2. Use an ad-hoc ansible command, find the free space of your servers. 3. Use an ad-hoc ansible command, find out the memory usage of your servers. 4. Do an ls -l on the targets /var/log/messages file. 5. Tail the contents of the targets /var/log/messages file. Solution: 1. ansible all -m ping 2. ansible all -a "/bin/df -h" 3. ansible all -a "/usr/bin/free" 4. ansible all -a "ls -l /var/log/messages" 5. ansible local -b -a "tail /var/log/messages"
  • 7. Redhat EX407 Exam Lab2. Ad-Hoc Ansible Commands (Number Two) Task: 1. Use the ad-hoc command to make sure php is installed. 2. Use the ad-hoc command to make sure that php is installed and is the latest version. 3. Use the ad-hoc command to make sure that httpd is installed. 4. Use the ad-hoc command to remove httpd from the servers. Solution: 1. ansible all -b -m yum -a 'name=php state=present' 2. ansible all -b -m yum -a 'name=php state=latest' 3. ansible all -b -m yum -a 'name=httpd state=latest' 4. ansible all -b -m yum -a 'name=httpd state=absent' Lab3. Static Inventories Task: 1. Add a new group to your default ansible host file. call the group [ec2] 2. Add a new host to the new group you created. 3. Add a variable to a new host entry in the /etc/ansible/hosts file. Add the following. localhost http_port=80 maxRequestsPerChild=808 4. Check to see if maxRequestsPerChild is pulled out with an ad-hoc command. 5. Create a local host file and put a target group and then a host into it. Then ping it with an ad-hoc command. Solution: 1. Edit the /etc/ansible/hosts file. Add a group. 2. Edit the /etc/ansible/hosts file. Add a user under the group you created. 3. Edit the /etc/ansible/hosts file. Find a host. if we add a variable called maxRequestsPerChild to the host it would look like this. host1 maxRequestsPerChild=808 4. ansible ec2 -m shell -a "echo {{ maxRequestsPerChild }}" 5. Edit a local file. It could be called anything. Lets call it myhosts. Inside the file it would have a host like the following. [mygroup] myusername1.mylabserver.com