[ansible-project] Infrastructure as Code - Manage Zabbix suggestions?

2021-12-15 Thread Lucas Possamai
Hi there. I'm deploying a brand new Zabbix cluster and wanted to do it the "right" way. I thought I would use Ansible to manage Zabbix, add hosts, add Media Types, Actions, etc, but the Ansible Zabbix Collection is

Re: [ansible-project] Re: Problem with delegate_to to group in inventory

2021-12-14 Thread Lucas Possamai
On Wed, 15 Dec 2021 at 19:00, Lucas Possamai wrote: > On Wed, 15 Dec 2021 at 18:44, Vladimir Botka wrote: > >> It's not possible to delegate a task to a group. Delegate to a host >> instead. Change the inventory. For example >> >> shell> cat hosts >>

Re: [ansible-project] Re: Problem with delegate_to to group in inventory

2021-12-14 Thread Lucas Possamai
On Wed, 15 Dec 2021 at 18:44, Vladimir Botka wrote: > It's not possible to delegate a task to a group. Delegate to a host > instead. Change the inventory. For example > > shell> cat hosts > zabbixprimary ansible_host=localhost ansible_port=2235 > zabbixslave ansible_host=localhost

[ansible-project] Re: Problem with delegate_to to group in inventory

2021-12-14 Thread Lucas Possamai
On Wed, 15 Dec 2021 at 16:03, Lucas Possamai wrote: > On Wed, 15 Dec 2021 at 15:36, Lucas Possamai wrote: > >> Hi guys. >> >> I'm trying to use the "delegate_to", to only run a certain task to a >> group in my inventory. >> >> inventory fil

[ansible-project] Re: Problem with delegate_to to group in inventory

2021-12-14 Thread Lucas Possamai
On Wed, 15 Dec 2021 at 15:36, Lucas Possamai wrote: > Hi guys. > > I'm trying to use the "delegate_to", to only run a certain task to a group > in my inventory. > > inventory file: > [zabbixprimary] > localhost ansible_port=2235 # zabbix primary > > [za

[ansible-project] Problem with delegate_to to group in inventory

2021-12-14 Thread Lucas Possamai
Hi guys. I'm trying to use the "delegate_to", to only run a certain task to a group in my inventory. inventory file: [zabbixprimary] localhost ansible_port=2235 # zabbix primary [zabbixslave] localhost ansible_port=2236 # zabbix secondary [zabbix:children] zabbixprimary zabbixslave main.yml:

[ansible-project] Copy folder from one host to another

2021-12-09 Thread Lucas Possamai
Hi all, I need to copy the content of a folder from one remote host to another remote host. The copy command needs to be executed as user "postgres". Folder to be copied from source: /data/postgresql/pg_xlog/ Destination: /data/wal_archive/ I tried looking online but couldn't find anything

[ansible-project] Registered variable returns expected value but task is skipped

2021-12-09 Thread Lucas Possamai
I'm trying to only run a task if the previous task returned a 0 stdout. - name: Check if efs-utils is already installed ansible.builtin.shell: dpkg -l | grep efs-utils | wc -l register: is_installed ignore_errors: "{{ ansible_check_mode }}" when: efs_id != "" and not ansible_check_mode - name:

Re: [ansible-project] Parted plugin fails after first run

2021-12-07 Thread Lucas Possamai
On Wed, 8 Dec 2021 at 01:25, Todd Lewis wrote: > > Also I noticed that the "Read device information (always use unit when > probing) " isn't being used. So I removed it. > That's too bad, because its output is exactly what we need to know why the > next bit is failing. It also contains the

Re: [ansible-project] Parted plugin fails after first run

2021-12-06 Thread Lucas Possamai
On Tue, 7 Dec 2021 at 13:26, Todd Lewis wrote: > I was able to get your playbook to work repeatedly on an external > thumdrive. It shows up as /dev/sda, so the full partition - after > changing to "number: 1" is /dev/sda1. My significant changes are bolded > below. Note that dev: and src: in the

Re: [ansible-project] Parted plugin fails after first run

2021-12-06 Thread Lucas Possamai
On Tue, 7 Dec 2021 at 06:27, Todd Lewis wrote: > You're specifying partition 2 w/o a size. On a blank disk (in my testing > at least) this produces a partition 1. Subsequent calls to the first task > fail because partition 1 consumes the entire disk, and partition 2 cannot > be created. However,

Re: [ansible-project] Parted plugin fails after first run

2021-12-06 Thread Lucas Possamai
On Mon, 6 Dec 2021 at 22:21, dulhaver via Ansible Project < ansible-project@googlegroups.com> wrote: > I have seen something similar with re-running LVM operations and remember > they mentioned to add a *force: yes* option (I don't recall the exact > wording though) in oder the not fail on

[ansible-project] Parted plugin fails after first run

2021-12-06 Thread Lucas Possamai
Hi all. I'm having issues with the parted plugin. It works when I run the playbook for the first time, but if I try to run again, it will fail. I actually want this task to be run only once, but the run_once parameter is not working either. -

Re: [ansible-project] Ansible 2.10.4 authorized_key - Syntax error

2020-12-21 Thread Lucas Possamai
On Mon, 21 Dec 2020 at 17:42, Abhijeet Kasurde wrote: > Hi Lucas, > > It seems that you are using Python 2.6 which is old and end-of-life. > Please upgrade to the latest version of Python. > > I got to know this by looking at log pasted in mail > > ``` > /usr/lib/python2.6 > ``` > > Hi

[ansible-project] Ansible 2.10.4 authorized_key - Syntax error

2020-12-20 Thread Lucas Possamai
Hi all, I'm trying to set up ansible.posix.authorized_key on my playbook, which look like this: - name: Set authorized key for Carol ansible.posix.authorized_key: user: carol state: present

Re: [ansible-project] purestorage sdk missing

2019-04-06 Thread Lucas Possamai
On Sun, 7 Apr 2019 at 01:32, Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 06.04.2019 13:20, Lucas Possamai wrote: > >> > >> Or just keep "hosts: dbservers" and add "delegate_to: localhost" on > >> the > >> purefa_

Re: [ansible-project] purestorage sdk missing

2019-04-06 Thread Lucas Possamai
> > Or just keep "hosts: dbservers" and add "delegate_to: localhost" on the > purefa_snap task. > Then you don't have to deal the SDK on the remote machine since the > module Python code is run on localhost. > The thing is... I want the playbook to be executed on the host (not locally). Testing

Re: [ansible-project] purestorage sdk missing

2019-04-05 Thread Lucas Possamai
On Sat, 6 Apr 2019 at 16:16, Lucas Possamai wrote: > On Sat, 6 Apr 2019 at 11:32, Jonathan Lozada De La Matta < > jloza...@redhat.com> wrote: > >> did you use a virtualenv? did you u do it as root? did you do it as your >> user? did you do pip install --user ? >

Re: [ansible-project] purestorage sdk missing

2019-04-05 Thread Lucas Possamai
On Sat, 6 Apr 2019 at 11:32, Jonathan Lozada De La Matta < jloza...@redhat.com> wrote: > did you use a virtualenv? did you u do it as root? did you do it as your > user? did you do pip install --user ? > No. All I did was to run, as my user (not root), pip install purestorage. Nothing else. --

Re: [ansible-project] purestorage sdk missing

2019-04-05 Thread Lucas Possamai
On Sat, 6 Apr 2019 at 01:58, Jonathan Lozada De La Matta < jloza...@redhat.com> wrote: > how did you install the python library purestorage ? > pip install purestorage -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

Re: [ansible-project] purestorage sdk missing

2019-04-05 Thread Lucas Possamai
On Fri, 5 Apr 2019 at 20:57, Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > This code doesn't prove that's running locally. > > modules will only run on localhost if the playbook have "hosts: > localhost" or "connection: local". > If not, the module will run on remote host(s) unless

Re: [ansible-project] purestorage sdk missing

2019-04-04 Thread Lucas Possamai
On Fri, 5 Apr 2019 at 06:15, David Baumann wrote: > Maybe forgot a delegate_to and you execure the module on remote host? > I am not executing the module on remote host. It is locally. This is the yaml file: --- # Perform PURE Flasharray Database snapshots - name: perform PURE volume snapshot

Re: [ansible-project] purestorage sdk missing

2019-04-04 Thread Lucas Possamai
On Thu, 4 Apr 2019 at 19:45, Raghavendra Rao wrote: > Make sure you have the respective purestorage python library. > I already have it. [lucas@thanos ~]$ pip list | grep 'purestorage' purestorage (1.16.0) > > Also, set PUREFA_URL and PUREFA_API environment variables if *url* and >

[ansible-project] purestorage sdk missing

2019-04-03 Thread Lucas Possamai
Hi guys. When calling a playbook I get the following error: FAILED! => {"changed": false, "msg": "purestorage sdk is required for this module in volume"} Purestorage sdk is installed in my laptop (i'm running that locally): purestorage (1.16.0) ansible 2.7.9 config file =