I've been "stuck" on Ansible 1.9.6 for several months now, due to some issues I 
ran into with Ansible 2.0.0-alpha-something-or-other, which I figured would get 
sorted out eventually.

This morning I decided I'd try upgrading to whatever version of Ansible pip 
gave me, which in this case was ansible 2.2.1.0

Didn't get very far, it seems to be tripping over smf.  

TASK [tftpserver : service] ****************************************************
fatal: [172.30.250.5]: FAILED! => {"changed": false, "failed": true, "msg": 
"/usr/sbin/svcadm: illegal option -- s\nUsage: svcadm [-S <state>] [-v] [-Z | 
-z zone] [cmd [args ... ]]\n\n\tsvcadm enable [-rst] [<service> ...]\t- enable 
and online service(s)\n\tsvcadm disable [-st] [<service> ...]\t- disable and 
offline service(s)\n\tsvcadm restart [-d] [<service> ...]\t- restart specified 
service(s)\n\tsvcadm refresh [<service> ...]\t\t- re-read service 
configuration\n\tsvcadm mark [-It] <state> [<service> ...] - set maintenance 
state\n\tsvcadm clear [<service> ...]\t\t- clear maintenance state\n\tsvcadm 
milestone [-d] <milestone>\t- advance to a service milestone\n\n\tServices can 
be specified using an FMRI, abbreviation, or fnmatch(5)\n\tpattern, as shown in 
these examples for svc:/network/smtp:sendmail\n\n\tsvcadm <cmd> 
svc:/network/smtp:sendmail\n\tsvcadm <cmd> network/smtp:sendmail\n\tsvcadm 
<cmd> network/*mail\n\tsvcadm <cmd> network/smtp\n\tsvcadm <cmd> 
smtp:sendmail\n\tsvcadm <cmd> smtp\n\tsvcadm <cmd> sendmail\n"}

The offending line in the playbook is:

  - service: name=network/ssh enabled=yes state=restarted

which is about as bog standard as it gets.

The man page says (in the context of enable) "If the -s option is specified, 
svcadm enables each service instance and then waits for each service instance 
to enter the online or degraded state. svcadm will return early if it 
determines that the service cannot reach these states without administrator 
intervention." with a similar comment for disable.

It seems -s is an appropriate flag only for enable or disable, not for restart, 
refresh, mark, clear, or milestone.  I'd expect that semantic to be useful for 
restart as well, but not having any OpenIndiana or Solaris 11 around, I'm not 
sure if it's that SmartOS is out of sync with its Solaris bretheren, or if 
Ansible is out of sync with Solaris.

Anyone else seeing this?

Thanks,

-r




-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to