Ansible on Freebsd with pkgng

399 views
Skip to first unread message

Laurentius Purba

unread,
Nov 12, 2014, 4:11:29 PM11/12/14
to ansible...@googlegroups.com
Hello all,

I have question regarding pkgng for FreeBSD.

The idea is I was trying to update php on one of our development servers. The current php version installed is 5.4.28, while we have on the port (/usr/ports/lang/php5) is 5.4.34.

Below is the playbook that I have:

- hosts: 10.0.21.99
  remote_user: jdoe
  sudo: yes
  tasks:
    - name: Upgrade php5
      pkgng: name=lang/php5 state=present cached=yes

From the command line, I executed the following with the output:
$>  ansible-playbook /etc/ansible/config/roles/common/tasks/php-upgrade.yml -K
sudo password: 

PLAY [10.0.21.99] ************************************************************* 

GATHERING FACTS *************************************************************** 
ok: [10.0.21.99]

TASK: [Upgrade php5] ********************************************************** 
ok: [10.0.21.99]

PLAY RECAP ******************************************************************** 
10.0.21.99                 : ok=2    changed=0    unreachable=0    failed=0

My question is, why I cannot upgrade my php version from what is install 5.4.28 to 5.434, even though I already use the cached=yes option.

Thanks for your help, guys.

-Laurentius

Marcus Jaschen

unread,
Nov 17, 2014, 12:05:48 PM11/17/14
to ansible...@googlegroups.com
On 12.11.14 22:11, Laurentius Purba wrote:
> Hello all,
>
> I have question regarding pkgng for FreeBSD.
>
> The idea is I was trying to update php on one of our development
> servers. The current php version installed is 5.4.28, while we have on
> the port (/usr/ports/lang/php5) is 5.4.34.
>
> Below is the playbook that I have:
>
> - hosts: 10.0.21.99
> remote_user: jdoe
> sudo: yes
> tasks:
> - name: Upgrade php5
> pkgng: name=lang/php5 state=present cached=yes

Hi Laurentius,

other package manager modules (i. e. 'apt') support a `state=latest`
option for upgrading already installed packages.

According to the docs the pkgng unfortunately doesn't support the
`latest` option for the `state` parameter.

I don't know much about how pkgng works but maybe you can upgrade PHP if
you uninstall the package first and afterwards re-install it. I don't
have a FreeBSD box here, so I can't test it now…

- hosts: 10.0.21.99
remote_user: jdoe
sudo: yes
tasks:
- name: Uninstall php5
pkgng: name=lang/php5 state=absent
- name: Install php5
pkgng: name=lang/php5 state=present cached=no

Marcus

>
> From the command line, I executed the following with the output:
> $> ansible-playbook
> /etc/ansible/config/roles/common/tasks/php-upgrade.yml -K
> sudo password:
>
> PLAY [10.0.21.99]
> *************************************************************
>
> GATHERING FACTS
> ***************************************************************
> ok: [10.0.21.99]
>
> TASK: [Upgrade php5]
> **********************************************************
> ok: [10.0.21.99]
>
> PLAY RECAP
> ********************************************************************
> 10.0.21.99 : ok=2 changed=0 unreachable=0 failed=0
>
> My question is, why I cannot upgrade my php version from what is install
> 5.4.28 to 5.434, even though I already use the cached=yes option.
>
> Thanks for your help, guys.
>
> -Laurentius
>
> --
> You received this message because you are subscribed to the Google
> Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ansible-proje...@googlegroups.com
> <mailto:ansible-proje...@googlegroups.com>.
> To post to this group, send email to ansible...@googlegroups.com
> <mailto:ansible...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9dfbb306-182c-465b-ba1b-4aa355df5c70%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/9dfbb306-182c-465b-ba1b-4aa355df5c70%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

--
Marcus Jaschen
Bahnhofstr. 10
12555 Berlin
Germany

+4915123038682
ma...@marcusjaschen.de
GPG Key: https://marcusjaschen.de/_assets/0xCE13FDF2.asc
https://www.marcusjaschen.de/

Michael DeHaan

unread,
Nov 17, 2014, 3:32:39 PM11/17/14
to ansible...@googlegroups.com
If it makes sense, I'd be quite open to whatever it takes to make 'latest' work here.

It is, I will say, not a primary OS for us -- but it's one we're definitely committed to enabling development on.



To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5468F028.9090600%40gmail.com.
Reply all
Reply to author
Forward
0 new messages