Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run msync from outside a ModuleSync configuration directory #155

Open
bittner opened this issue May 29, 2018 · 5 comments
Open

Run msync from outside a ModuleSync configuration directory #155

bittner opened this issue May 29, 2018 · 5 comments

Comments

@bittner
Copy link
Contributor

bittner commented May 29, 2018

It doesn't seem to be possible to run msync update from a location outside a directory containing a modulesync configuration.

In other words, it seems to be necessary to cd into the directory containing your configuration to be able to successfully run msync update.

$ msync update -m configs/modulesync_puppet-profile
No config file under ./config_defaults.yml found, using default values
./moduleroot/ does not exist. Check that you are working in your module configs directory or that you have passed in the correct directory with -c.
$ msync update -c configs/modulesync_puppet-profile
No config file under modulesync.yml found, using default values
No value provided for required option "--message"
$ cd configs/modulesync_puppet-profile && msync update
No config file under ./config_defaults.yml found, using default values
Syncing <repository-name>
Cloning repository fresh
Cloning from <repository-uri>.git
...

This is tedious when you manage several configurations in a single repository (in subdirectories), and loop over them. For example, our directory structure looks like this, and I'd like to run msync with the directory (or directories) as a parameter (instead of cd'ing into them).

.
├── configs/
│   ├── modulesync_puppet-hieradata/
│   │   ├── managed_modules.yml
│   │   ├── moduleroot/
│   │   │   ├── .gitignore.erb
│   │   │   └── .gitlab-ci.yml.erb
│   │   ├── modulesync.yml
│   │   └── README.md
│   └── modulesync_puppet-profile/
│       ├── managed_modules.yml
│       ├── moduleroot/
│       │   ├── .gitignore.erb
│       │   └── .gitlab-ci.yml.erb
│       ├── modulesync.yml
│       └── README.md
├── tools/
├── Gemfile
├── LICENSE
└── README.md

Is there a way to achieve this already, which I have not figured out yet? Or should we add this functionality?

@bittner
Copy link
Contributor Author

bittner commented Oct 31, 2018

Any feedback on this issue? Would adding the (seemingly) missing capability be a valuable enhancement?

@bittner
Copy link
Contributor Author

bittner commented Feb 26, 2019

Anyone any opinion on that?

@bastelfreak
Copy link
Member

Hi @bittner, sorry for the slow feedback. This is a bit different from the original usecase for this tool, but I don't see why it should not be included. Are you interested in providing a PR for this?

@bittner
Copy link
Contributor Author

bittner commented Mar 10, 2019

Are you interested in providing a PR for this?

Yes, definitely. The question was: Would a related PR have a chance to be merged.

@bastelfreak
Copy link
Member

definitely!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants