My frist Playbooks - Please Comment

Hi, folks

I create my first playbook and I’d like, if possible, comments.

https://github.com/marcelojscosta/ansible-example-playbooks/blob/master/bootnode.yml

I had doubts in the use of rsync and when I change the owner of a directory and also for copying flat files to specific directories like .bashrc, 10-fastcgi.conf and lighttpd.conf.

In fact, I first create the directory, then I copy the data recursively with rsync and then change the owner of the directory that was created. (user: www-data group: www-data)

Did can I do these tasks with fewer lines?

My approach is correct?

Thanks,

Marcelo Costa

A few small things:

" action: command mkdir -p //sites creates=//sites"

can be replaced with:

file: path=/path state=directory

You should not be using $old variables and should be using {{ new }} variables

Configuration files should probably be laid down with the template module.

You should probably look into using roles at some point later, just because they are nice, but it’s not required.

I believe update_cache=yes can be passed on the same line with the apt module to install the package. There’s a cache timeout. (See docs)