Skip to content

Run msync from outside a ModuleSync configuration directory #155

@bittner

Description

@bittner

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions