Re: [ansible-project] Unable to run command via Ansible to Sonus and Acme/Oracle SBC

2020-06-14 Thread Kai Stian Olstad
On Thu, May 14, 2020 at 05:43:28AM -0700, Ravi Virmani wrote: > Hello Kai > > I am also facing same problem and in my case command prompt is '>' . Where You should have create a new thread instead of resurrect a almost 2 year old thread that has been resolved. > I need to hit 'configure' first

[ansible-project] how to restrict scope for set_fact variable

2020-06-14 Thread Diyawary
Could any one please help me on it . Appriciate your help in advance . -- 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-project+unsubscr...@googlegrou

[ansible-project] vcsa deploy error

2020-06-14 Thread Tony Wong
I am trying to deploy vcsa with this role vcsa-deploy - repo_dir: '/opt/repo' vcsa_iso: 'VMware-VCSA-all-6.7.0-9451876.iso' vcsa_task_directory: '/etc/ansible/roles/vcsa-deploy/tasks' ovftool: '/mnt/iso/vcsa/ovftool/lin64/ovftool' vcsa_ova: 'vcsa/VMware-vCenter-Serve

[ansible-project] offending line appears to be state: directory

2020-06-14 Thread Tony Wong
any idea what is wrong with my playbook here? - name: Retrieve info about the mount directory stat: path: "{{ mount_dir_path }}" register: mount_dir_stat_first tags: - prereqs # If the mount directory doesn't already exist it is created - name: Create the mount directory become

[ansible-project] Ansible config file in current directory not used

2020-06-14 Thread Guy Knights
According to the docs (https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings-locations), Ansible is supposed to use ansible.cfg from the current directory as the second option if the env var ANSIBLE_CONFIG isn't defined. However it doesn't appe

[ansible-project] --ask-become-pass

2020-06-14 Thread Tony Wong
how do i store the --ask-become-password for sudo to a vaults file? -- 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-project+unsubscr...@googlegroups.c

Re: [ansible-project] Inject vault password with plugin

2020-06-14 Thread Kai Stian Olstad
On Sun, May 24, 2020 at 05:27:00PM -0700, FERREIRA CHRISTOPHE wrote: > Only option i know is ask-vault-pass environment vars and vault password file And scripts https://github.com/ansible/ansible/blob/stable-2.9/contrib/vault/ -- Kai Stian Olstad -- You received this message because you are s

[ansible-project] The ipaddr filter requires python's netaddr be installed on the ansible controller"

2020-06-14 Thread Tony Wong
any idea what this error is? TASK [vcsa-deploy : Create a task from the template to deploy VCSA with embedded PSC] ** task path: /home/tony/ansible-vmware/vsphere-sddc/playbooks/roles/vcsa-deploy/tasks/deploy.yml:25 <127.0.0.1> ESTABLISH LO

Re: [ansible-project] filter on attribute value

2020-06-14 Thread Kai Stian Olstad
On Sun, May 24, 2020 at 11:28:06PM +0530, Anuj Agrawal wrote: > I want to validate my inventory to have only a certain number of hosts > to have a certain value. I tried to do that using assert but I am > unable to find a way to do so. > > Example inventory (ini) file: > > [nginx] > 10.52.130.31

[ansible-project] Inject JSON file using URI

2020-06-14 Thread Renato Marcandier
hey guys, I need to inject a .json file into an application using ansible. I know that we have a module called URI. However this application accepts only by Content-Type: "application/x-www-form-urlencoded" ... in this case, I can't use "src:file.json" Is that correct? .. Do I need to create

Re: [ansible-project] The ipaddr filter requires python's netaddr be installed on the ansible controller"

2020-06-14 Thread Scott Sturdivant
Yes, you must have the netaddr python library installed on your controller. Read the first few sentences here: https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters_ipaddr.html On Sun, Jun 14, 2020 at 12:13 PM Tony Wong wrote: > any idea what this error is? > > > TASK [vcsa-deplo

Re: [ansible-project] Inject JSON file using URI

2020-06-14 Thread Dick Visser
On Sun, 14 Jun 2020 at 20:22, Renato Marcandier wrote: > > hey guys, > > I need to inject a .json file into an application using ansible. > I know that we have a module called URI. However this application accepts > only by Content-Type: "application/x-www-form-urlencoded" ... in this case, I >

Re: [ansible-project] Ansible config file in current directory not used

2020-06-14 Thread Dick Visser
On Sun, 14 Jun 2020 at 19:47, Guy Knights wrote: > > According to the docs > (https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings-locations), > Ansible is supposed to use ansible.cfg from the current directory as the > second option if the env

Re: [ansible-project] The ipaddr filter requires python's netaddr be installed on the ansible controller"

2020-06-14 Thread Tony Wong
thanks On Sun, Jun 14, 2020 at 11:24 AM Scott Sturdivant < scott.sturdiv...@gmail.com> wrote: > Yes, you must have the netaddr python library installed on your controller. > > Read the first few sentences here: > https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters_ipaddr.html > >

[ansible-project] Ansible rolling restart in multi-clustered environment

2020-06-14 Thread Rishabh Kumar
Hi, I have a use case where I want to execute rolling updates in multiple clusters. As first step, I have created a task to execute serially on the hosts passed to the task which will execute the restart one node at a time. Currently it takes O(n) time for node restart assuming total number of

[ansible-project] ansible-playbook --ask-become-user in vault file?

2020-06-14 Thread Tony Wong
can i put a sudo password and other passwords together in a vault file? when i run thios playbook, i want it to read the vault file w/o asking me for the password anymore ansible-playbook --ask-vault-pass vcenter_sddc_deploy.yml --ask-become-pass -vvv -- You received this message because you

Re: [ansible-project] ansible-playbook --ask-become-user in vault file?

2020-06-14 Thread Dick Visser
Yes, see https://docs.ansible.com/ansible/latest/user_guide/become.html#become-connection-variables On Mon, 15 Jun 2020 at 00:20, Tony Wong wrote: > can i put a sudo password and other passwords together in a vault file? > > when i run thios playbook, i want it to read the vault file w/o askin

Re: [ansible-project] Abort playbook if host is not ready

2020-06-14 Thread Kai Stian Olstad
On Thu, May 28, 2020 at 10:52:37AM -0700, Laci wrote: > Is there a good way to abort the playbook if host is not ready? > For example I want to run a playbook against *thisserver*, but *thisserver* > is > unreachable by ssh or it is reachable but there is no python install. If > any of these occ

[ansible-project] Needs to Write a Playbook

2020-06-14 Thread rama543
Hi Friends, I am new to this Ansible world Needs to write a playbook for one scenario Scenario-1: I have 1000 Servers . Host-names are like Server1, Server2, Server3, Server4, Server5, .Server1000 . I have two Script files Script-1.sh and Script-2.sh in my controller . Now i wa