Working with The 'GetURL' Module lecture video.

I was trying out my get_url playbook, but was hitting an issue with reaching a resource on the remote server using a http url. In the video, we seem to be able to reach the /var/www/html location without specifying it within the server url. Is there something configured behind the scenes?

My playbook looks like the following:

--- # GET_URL module example

- hosts: apacheweb

user: test

become: true # because .ini file is owned by root so need to access it as such

connection: ssh

gather_facts: no


- name: Get and download the INI file from the apacheweb server

get_url: url= dest=/home/test/mytest.ini mode=0440

Thank you for your time.
  • post-author-pic
    Terrence C

    The default apache web server location is /var/www/html, which should be accessible along with files in it as long as you have not changed the server directory directive in the configuration file. However, looks like your mytest.ini is in your home directory, the configuration for the apache web server will have to be updated in that case AND either the security context of the directory will have to be changed OR SELinux will have to be put into 'permissive' mode (sudo setenforce 0) or completely disabled to allow it to be accessed.

  • post-author-pic
    Benjamin C

    Hi Terrence, thanks for the details. Where would I need to look to alter the apache web server configuration? While reviewing the video, I didn't recall any reference to having to change config, I thought we were free to set the destination as long as we had permissions. But are you saying that the dest by default should be the /var/www/html?

    Also, does changing the linux security settings needed because I'm trying to alter the default directory?

    Thanks for your time.

Looking For Team Training?

Learn More