hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
 
[20130202] NetBSD Package Management with Ansible 1.0 and pkgin
With Murphy's law striking in full force, ansible 1.0 was released only a few hours after I've packaged version 0.9 yesterday. Anyways, I have updated the package to version 1.0, and made it available for review.

There are a bunch of new modules in version 1.0, and probably the most exciting one is a "pkgin" module that allows adding and deleting packages:

vmnetbsd6% pkg_info -e figlet
vmnetbsd6% ansible -soi work/ansible/hosts.HF all -m pkgin -a "name=figlet state=absent"
127.0.0.1 | success >> {"changed": false, "msg": "package(s) already absent"}

vmnetbsd6% pkg_info -e figlet
vmnetbsd6% ansible -soi work/ansible/hosts.HF all -m pkgin -a "name=figlet state=present"
127.0.0.1 | success >> {"changed": true, "msg": "present 1 package(s)"}

vmnetbsd6% pkg_info -e figlet
figlet-2.2.5
vmnetbsd6% ansible -soi work/ansible/hosts.HF all -m pkgin -a "name=figlet state=absent"
127.0.0.1 | success >> {"changed": true, "msg": "removed 1 package(s)"}

vmnetbsd6% pkg_info -e figlet
vmnetbsd6% 


[Tags: ]


Disclaimer: All opinion expressed here is purely my own. No responsibility is taken for anything.

Access count: 36170975
Copyright (c) Hubert Feyrer