Two queries regarding ansible

I have just started using ansible so pardon me my n00b-ness :smiley:

No problem!

I have two questions

1) It is my understanding that when we use yum it downloads the packages
from internet.How can we orchestrate the rpm's installation from one machine
to another.

You can configure whatever sources you like in /etc/yum.repos.d

The template module is great for this.

Typically yum repos are created with createrepo and mirrored with reposync.

Explanation

I have all the packages on server A which is the entry point of all other
servers in the infrastructure.I want to run ansible on server A and install
rpm's which are placed on server A on all other machines.How would i do
that?

2) If i want to change only one parameter in a file on clients how can i
achieve this without copying a file everytime? e.g i want to change the
webserver port in httpd.conf from 80 to 8080.

The lineinfile module is good for config file surgery operations,
though it's always better to declare exactly what is in the file if
you can, that
way you are positive you know what is in the file.

It's also not true that the copy module will copy the file every time.

Both copy and template will transfer the file only if the remote
md5sum would have been different.