Slackbot
11/13/2023, 6:05 AMsmortex
11/13/2023, 6:13 AMbolt-debug.log
file which may have more details (even with default logging).kaorukobo
11/13/2023, 6:15 AMsmortex
11/13/2023, 6:29 AMbolt command run -t TARGET "id"
to check that you connect where you think and as the user you think (no --run-as root
in your example, usually Puppet needs to be root to manage the system). Other than id
you can try env
, facter
, which puppet
to see if it finds the tooling. I remember some issues depending on the env of the remote user, and sudo can also be tuned to change the environment, e.g. providing a custom $PATH
.smortex
11/13/2023, 6:30 AMbolt task run puppet_agent::install -t TARGET
called directly may give more details maybe?kaorukobo
11/13/2023, 6:52 AM$ bolt command run -t TARGET "id"
uid=0(root) gid=0(root) groups=0(root)
$ bolt command run -t TARGET "which puppet"
/usr/bin/puppet
$ bolt command run -t TARGET "facter"
(JSON printed)
... but this command did not work:
$ bolt task run puppet_agent::install -t TARGET
Could not find a task named 'puppet_agent::install'. For a list of available tasks, run 'bolt task show'.
I remembered that I installed the bolt using gem install bolt
into my own interpreter env /opt/rbenv/versions/3.2.2
.
Do I need to install any dependent gems that provides puppet_agent::install
task?Yury Bushmelev
11/13/2023, 7:40 AMYury Bushmelev
11/13/2023, 7:44 AMkaorukobo
11/13/2023, 8:09 AM$ vi bolt-project.yaml
# added lines
modules:
- puppetlabs-service
- puppetlabs-puppet_agent
- puppetlabs-facts
$ bolt task run puppet_agent::install -t TARGET
(snip)
Started on TARGET...
Finished on TARGET:
17:02:32 +0900 INFO: Version parameter not defined and agent detected. Nothing to do.
@Yury Bushmelev @smortex Thank you a lot for all your help.πkaorukobo
11/13/2023, 8:14 AMYury Bushmelev
11/13/2023, 8:18 AMYury Bushmelev
11/13/2023, 8:18 AMbastelfreak
11/13/2023, 9:35 AMkaorukobo
11/14/2023, 12:56 AMgem install
was easier and quicker way for me than macOS package or brew cask
. I also assumed that bolt would work faster on Ruby 3.2 than the bundled Ruby 2.7.
I had to pay more attention to the words "with all of its dependencies" in the warning messageπ
Bolt might be installed as a gem. To use Bolt reliably and with all of its dependencies, uninstall the 'bolt' gem and install Bolt as a package
bastelfreak
11/14/2023, 7:36 AM