Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • How to setup repository ftp server ansible playbook

    Posted on

    I'm training for my RHCE 8 EXAM, and I have to:

    Create a playbook with the name setupreposerver.yaml to set up the control host as a repository host. Make sure this host meets the following requirements, which must be done by the playbook:

    a. The RHEL 8 installation ISO is loop-mounted on the directory /var/ftp/repo.

    b. The firewalld service is disabled.

    c. The vsftpd service is started as well as enabled, and it allows anonymous user access to the /var/ftp/repo directory.

    Then, create a Bash script that configures the managed servers as repository clients to the repository server that you set up in the previous tasks. This script must use ad hoc commands and perform the following tasks:

    a. Disable any currently existing repository.

    b. Enable access to the BaseOS repository on control.example.com

    c. Enable access to the AppStream repository on control.example.com

    I have tried many things, but I can't enable access to BaseOS and AppStream from my managed nodes. After I mount /dev/sr0 I can't execute the createcrepo command

    https://i.stack.imgur.com/q1Thu.png --- client side repo setup playbook

    https://i.stack.imgur.com/qkGW3.png --- client side repo setup playbook error

    https://i.stack.imgur.com/ZE9oF.png --- server side repo setup playbook

    https://i.stack.imgur.com/KprgT.png --- server side repo setup playbook part2

    I need access to BaseOS and AppStream because later I will need to download packages into my managed node using my control node repo through ftp.

    I have tried just putting the rpms files straight into /var/ftp/repo and then setting up the repo client with ftp://control.example.com/repo and it works, I can download the package.

    But I want to access the rpm packages inside BaseOS and AppStream, and I can't find a solution. I tried copying all the rpms to another directory, then unmounting, and then moving the backed up rpms back into /var/ftp/repo but then it wouldn't be the right way.

    Can someone help me find a solution. Thanks

    My server side playbook executes with no errors by the way.

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat