Puppet+Docker: How do i configure my docker container to use a NFS volume through a Hiera config file?

0 votes
I need to configure my docker container to use a NFS volume. I have a hiera.yml that has all the necessary configurations. Can I add the configuration to use a NFS volume in the same hiera.yml instead of writing it in the Puppet manifest. If yes, How ?
Aug 14 in Puppet by Karan
• 6,650 points
37 views

1 answer to this question.

0 votes

If using Hiera, configure the docker::volumes class in the manifest file:

---
  classes:
    - docker::volumes
            
docker::volumes:
  blueocean:
    ensure: present
    driver: local
    options:
      type: "nfs"
      o: "addr=%{custom_manager},rw",
      device: ":/srv/blueocean"

This will ensure configurations are made using a hiera.yml file.

answered Aug 14 by Sirajul
• 40,980 points

Related Questions In Puppet

0 votes
0 answers
0 votes
1 answer

Puppet+Docker: How do i configure a swarm if i am using windows server 2016.

There are a few considerations to be ...READ MORE

answered Aug 16 in Puppet by Sirajul
• 40,980 points
39 views
0 votes
1 answer

Puppet in Docker : How do i run my dockerized puppet container periodically?

Instead of running a Dockerized puppet container onetime, ...READ MORE

answered Aug 19 in Puppet by Sirajul
• 40,980 points
47 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,960 points
252 views
0 votes
1 answer