Re: [ansible-project] Complex process to generate template/lineinfile data?

2021-05-15 Thread Richard Hector
On 15/05/21 6:39 pm, Richard Hector wrote: Any suggestions? Is this stuff reasonable to do with ansible, and a templating language? Do I need to write a custom plugin of some kind? If I had a dynamic inventory, then I could probably generate extra variables at that stage, but that's further

[ansible-project] short-circuit eval in templated string works only sometimes?

2021-05-15 Thread Scott Mcdermott
Hello, why does short circuit only works for the first two cases: - hosts: localhost become: false vars: ivar: '{{hostvars[inventory_hostname].dne}}' tasks: - debug: msg: "works: {{'foo' or dne}}" - debug: msg: "works: {{'bar' or

[ansible-project] Re: How do i use regex_findall filter to display partial output of 'sh clock' command?

2021-05-15 Thread Vikram S
Hi, I suspect your script may show ewverything in 'sh clock' output and not the partial output i wanted. Thanks for the links, will check them. Regards, Vikram On Tuesday, 11 May, 2021 at 7:43:29 am UTC+5:30 aco...@gmail.com wrote: > something like - "{{ show_clock.stdout[0] | >

Re: [ansible-project] How to fetch data from hp iLo

2021-05-15 Thread NAVEEN
Hello , Finally i got some out ..by using the below code --- - hosts: localhost vars: iLo_IP: '0.0.0.0' #ILO IP iLo_username: 'username' #ILO IP iLo_password: 'password' #ILO Password tasks: - hpilo_facts: host: "{{ iLo_IP }}" login: "{{ iLo_username }}" password: "{{ iLo_password }}"

[ansible-project] Complex process to generate template/lineinfile data?

2021-05-15 Thread Richard Hector
Hi all, Well, it's not really that complex, but seems complex to do within the constraints of ansible/jinja. My scenario is that I run dirvish to back up multiple containers on multiple hosts. The containers are backed up via the filesystems on the hosts. The root filesystem of the