qubitrenegade / certbot-exec

MIT License
2 stars 1 forks source link

always shows skipped due to action :nothing #4

Open chenghung opened 5 years ago

chenghung commented 5 years ago

my recipe:

node.default['certbot-exec']['agree_to_tos'] = true
node.default['certbot-exec']['email'] = 'mymail@gmail.com'

certbot_exec 'mysite.ddns.net' do
  domains 'mysite.ddns.net'
  action :run
end

output of chef-client:

  * certbot_repo[repo] action create
    * apt_repository[certbot] action add
      * execute[apt-cache gencaches] action nothing (skipped due to action :nothing)
      * apt_update[certbot] action nothing (skipped due to action :nothing)
      * execute[install-key 7BF576066ADA65728FC7E70A8C47BE8E75BCA694] action run (skipped due to not_if)
      * file[/etc/apt/sources.list.d/certbot.list] action create (up to date)
       (up to date)
     (up to date)
  * certbot_pkg[certbot] action install
    * apt_package[install-certbot] action install (up to date)
     (up to date)
  * certbot_pkg[certbot] action install
    * apt_package[install-certbot] action install (up to date)
     (up to date)
  * certbot_cmd[execute-certbot] action exec (up to date)
  * certbot_cmd[execute-certbot] action exec (up to date)

...

Recipe: wiki::setup_https
  * certbot_exec[mysite.ddns.net] action nothing (skipped due to action :nothing)
  * service[nginx] action reload
    - reload service service[nginx]

is it a bug ?

qubitrenegade commented 5 years ago

Hi @chenghung thanks for your issue! Sorry that you're having problems. Couple questions for you:

certbot_exec 'mysite.ddns.net' do
  domains 'mysite.ddns.net'
  force true
  action :run
end

For debugging purposes, have you tried force true?

Thanks again for opening the issue, hopefully we can get ya up an running!


(Totally as an aside, the "name" property of the resource is also the domains property, so these are equivalent:

certbot_exec 'mysite.ddns.net'

and

certbot_exec 'mysite.ddns.net' do
  domains 'mysite.ddns.net'
  action :run
end

My thinking was, you might want to do:

certbot_exec 'create mysite' do
  domains 'mysite.ddns.net'
  action :run
end

It's interesting to see how other people are using the resource.)

qubitrenegade commented 5 years ago

@chenghung any updates? I'd love to help you figure out any issues...

My answer to the general: "it always shows skipped due to action :nothing" is, yea, it'll do that."... for every instance of certbot_exec, we execute certbot_exec :nothing... during the "compile" phase. then it's executed first thing during the execute phase.

Basically, I've always hoped someone would find my code useful... so help me help you? lol

I want to make this work for you, so any more info you can give me will help me help you.