Re: [ansible-project] ansible secret has a special character ':' (colon) at the end how to deal with special characters in asnible-vault/secrets ?

2020-10-12 Thread Dick Visser
https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html On Mon, 12 Oct 2020 at 18:54, sk32...@gmail.com wrote: > Exception : > > "yaml.scanner.ScannerError: mapping values are not allowed here in > "", line 1, column 22: ldappass: ***: > > -- > You received this m

Re: [ansible-project] Server build post tasks with ansible

2020-10-12 Thread kumare...@gmail.com
Hi, We are building servers manually through azure portal post build would like to have ansible playbook execute automatically? Is that possible? Regards Kumar On Saturday, 19 September 2020 at 23:27:28 UTC+5:30 gajendra@gmail.com wrote: > Yes I did for VMware, please post your query > >

Re: [ansible-project] Error when writing to another directory

2020-10-12 Thread Stefan Hornburg (Racke)
On 10/13/20 2:42 AM, Liew KengHong wrote: > Hi,  > I have a template that copy the configuration file to another directory. But > it return fatal error: >  {"msg": "The task includes an option with an undefined variable. The error > was: 'deploy_dir' is undefined\n\nThe error > appears to be in

[ansible-project] Re: Error when writing to another directory

2020-10-12 Thread Liew KengHong
--- - set_fact: date: "{{ lookup('pipe', 'date +%Y%m%d-%H%M') }}" - set_fact: file_name: "{{ ansible_host }}_config_{{ date }}" - name: Backup Nexus config nxos_config: backup: yes backup_options: filename: "{{ file_name }}" register: nxos_output - set_fact: temp_backup_file: "{{ nxos_output.ba

[ansible-project] Error when writing to another directory

2020-10-12 Thread Liew KengHong
Hi, I have a template that copy the configuration file to another directory. But it return fatal error: {"msg": "The task includes an option with an undefined variable. The error was: 'deploy_dir' is undefined\n\nThe error appears to be in '/tmp/awx_2010_v_ijeetv/project/roles/backup_nxos/task

[ansible-project] ERROR! the field 'hosts' is required but was not set

2020-10-12 Thread Subhash Chandra Ranga
--- - name: install nginx with the my own php format hosts: webservers remote_user: ubuntu become: yes tasks: - ping: ~ - name: install packages in webservers group become: true apt: name: nginx state: present - name: install packages in webserv

Re: [ansible-project] ERROR! this task 'yum' has extra params

2020-10-12 Thread Subhash Chandra Ranga
Thank you On Mon, Oct 12, 2020, 16:39 uday kiran wrote: > Keep the state=present in the next line and keep as state: present > > On Mon, Oct 12, 2020, 8:05 PM Subhash Chandra Ranga > wrote: > >> >> --- >> - name: install nginx with the my own php format >> hosts: webserevers >> remote_user:

Re: [ansible-project] ERROR! this task 'yum' has extra params

2020-10-12 Thread Subhash Chandra Ranga
Thank you On Mon, Oct 12, 2020, 16:39 Matt Martz wrote: > You have spaces around the `=` for `state`. Instead of `state = present` > it should be `state=present`. Or even better is to use YAML format: > > - name: install packages in webservers group > yum: > name: nginx >

[ansible-project] Ansible GCP Project enable APIs

2020-10-12 Thread Ian Hiddleston
Hi all, I've had a rummage through the documentation but can't see an Ansible native way to enable APIs on a GCP project (I can create the project just fine with Ansible, it just comes without all the APIs I need turned on). Can anyone point me in the right direction before I hack something tog

[ansible-project] ansible secret has a special character ':' (colon) at the end how to deal with special characters in asnible-vault/secrets ?

2020-10-12 Thread sk32...@gmail.com
Exception : "yaml.scanner.ScannerError: mapping values are not allowed here in "", line 1, column 22: ldappass: ***: -- 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,

Re: [ansible-project] ERROR! this task 'yum' has extra params

2020-10-12 Thread Matt Martz
You have spaces around the `=` for `state`. Instead of `state = present` it should be `state=present`. Or even better is to use YAML format: - name: install packages in webservers group yum: name: nginx state: present On Mon, Oct 12, 2020 at 9:35 AM Subhash Chandra Ran

Re: [ansible-project] ERROR! this task 'yum' has extra params

2020-10-12 Thread uday kiran
Keep the state=present in the next line and keep as state: present On Mon, Oct 12, 2020, 8:05 PM Subhash Chandra Ranga wrote: > > --- > - name: install nginx with the my own php format > hosts: webserevers > remote_user: ubuntu > become: yes > > tasks: > - ping: ~ > > - name: ins

[ansible-project] ERROR! this task 'yum' has extra params

2020-10-12 Thread Subhash Chandra Ranga
--- - name: install nginx with the my own php format hosts: webserevers remote_user: ubuntu become: yes tasks: - ping: ~ - name: insert index.php file become: true template: src=/Network-Automation/templates/index.php dest="/var//html/index.php" - name:

Re: [ansible-project] Ansible Nmap

2020-10-12 Thread Mayang Sari
I tried edit /etc/ansible/ansible.cfg and add ini and auto in enable_plugins On Monday, October 12, 2020 at 3:55:42 PM UTC+7 Mayang Sari wrote: > Hello Brain, > > Sorry for late replay > I tried and got this error > > ansible-inventory --list --yaml -i test.nmap.yml > inventory.yml > [WARNIN

[ansible-project] Different credentials

2020-10-12 Thread uday kiran
It is not related to the other issue I posted. I have some set of windows machines, which we are connecting through credentials in the inventory file. For all the machines the username/password is same. But, for some machines, the password got changed. So, we have one username and two passwords.

[ansible-project] Re: Windows machine not pinging.

2020-10-12 Thread uday kiran
But the credentials are correct. On Saturday, 10 October 2020 at 05:25:37 UTC+5:30 jbor...@gmail.com wrote: > The ping and win_ping modules aren't doing an ICMP ping, they are checking > to see if Ansible can connect to the host and execute a very basic module. > In your case it's able to conne

Re: [ansible-project] Ansible Nmap

2020-10-12 Thread Mayang Sari
Hello Brain, Sorry for late replay I tried and got this error ansible-inventory --list --yaml -i test.nmap.yml > inventory.yml [WARNING]: * Failed to parse /Jaks/test.nmap.yml with yaml plugin: Plugin configuration YAML file, not YAML inventory [WARNING]: * Failed to parse /Jaks/test.nmap.ym

[ansible-project] How to convert output of task in dictionary

2020-10-12 Thread Kundan Singh
Hi All, I am new to ansible working on a requirement where the the command has been executed and output has been stored in register. Need your guidance to find how to change the out put in dictionary or json file format. *---* *# execute command and capture output.* *- name: DB to check latenc