Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-14620

Incorrect explanation of trailing slash behavior in ansible.builtin.copy module documentation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • RH294 - RHEL9.0-en-2-20221117
    • RH294
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • en-US (English)

      Please fill in the following information:


      URL: https://rol.redhat.com/rol/app/courses/rh294-9.0/pages/ch07s04
      Reporter RHNID: nehsingh@redhat.com
      Section Title:    ch07s04 Guided Exercise: Creating Roles                                                                

      Issue description

      The note given in the 7th step is incorrect.
      It says the following:
      "The trailing slash causes the source directory and all of its contents to be copied to the managed host."
      That is incorrect; the trailing slash causes the contents of the source directory to by copied and not the source directory itself.
      Here is an excerpt from the documentation of the ansible.builtin.copy module (regarding the src option):
      "if path ends with "/", only inside contents of that directory are copied to destination. Otherwise, if it does not end with "/", the directory itself with all contents is copied."

      Steps to reproduce:

       

      Workaround:

       

      Expected result:

              glsbugs-automation@redhat.com PTL - Ansible Team
              nehsingh@redhat.com Neha Singh
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: