Hi Team,
I have created one file where I have specify a variable:
path: /opt/si/ansible/conf/virtual_host
transient_partition_size = 200G
And then trying to print the variable by using lookup through another
playbook:
- debug:
msg: "{{ lookup('ini', 'transient_partition_size
section={{contro
Error is - File contains no section headers.
You need a section in ini file that you have created.
On Fri, Mar 10, 2023 at 6:25 PM Neha Singh wrote:
> Hi Team,
>
> I have created one file where I have specify a variable:
>
> path: /opt/si/ansible/conf/virtual_host
>
> transient_partition_size =
Ok, one more question though. I have not mentioned any file extension like
.ini, .conf, .cfg. Will that work without the same as well.
Thanks
Neha
On Friday, March 10, 2023 at 6:30:40 PM UTC+5:30 Abhijeet Kasurde wrote:
> Error is - File contains no section headers.
>
> You need a section in i
Hey,
Is there a typo in file name
- and _.
Or it's only in mail.
Warm regards
Abhijeet
On Fri, 10 Mar, 2023, 14:17 Neha Singh, wrote:
> Ok, one more question though. I have not mentioned any file extension like
> .ini, .conf, .cfg. Will that work without the same as well.
>
> Thanks
> Neha
>
>
Hi Abhijeet,
I have updated my config file as below:
file path: /opt/si/ansible/conf/virtual_host.conf
[control_environment]
transient_partition_size = 150G
and my playbook task is as below:
- debug:
msg: "{{ lookup('ini', 'transient_partition_size
section={{control_environment}}
file=/opt/s
Adding the full error message:
Error was a , original message: An
unhandled exception occurred while running the lookup plugin 'ini'. Error
was a , original message: No section:
u'edgy'"}ESC[0m
On Friday, March 10, 2023 at 7:22:10 PM UTC+5:30 Neha Singh wrote:
> Hi Abhijeet,
>
> I have update
# cat virtual_host.conf
[control_environment]
transient_partition_size = 150G
---
- hosts: localhost
gather_facts: no
tasks:
- debug:
msg: "{{ lookup('ini', 'transient_partition_size
section=control_environment file=virtual_host.conf') }}"
output -
```
TASK [debug]
**
As mentioned in the error:
Error was a , original message: An
unhandled exception occurred while running the lookup plugin 'ini'. Error
was a , original message: No section:
u'edgy'"}
When I have updated the section name with 'edgy' as below:
[edgy]
transient_partition_size = 150G
and used th
You are using '{{' for Jinja templating for section name in the lookup
plugin.
If you are setting the section value to 'control_environment' then don't
include the '{{' in the lookup plugin.
On Fri, Mar 10, 2023 at 7:45 PM Neha Singh wrote:
> As mentioned in the error:
> Error was a , original
If you mistakenly believe using `ansible-runner` is too much work, then you
can instead do even more work to put your tasks in blocks with `rescue` and
`always` sections to record the data which you can later collate. See
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_blocks.ht
Your quoting is all wrong. You are passing in one long string.
Use this:
msg: "{{ lookup('ini', 'transient_partition_size',
section='control_environment',
file='/opt/si/ansible/conf/virtual_host.conf') }}"
On Friday, March 10, 2023 at 9:37:39 AM UTC-5 Abhijeet Kasurde wrote:
> You are using
Also, if your file doesn't have sections, only `key=value` pairs, then
specify `type='properties'`, like this:
msg: "{{ lookup('ini', 'transient_partition_size', type='properties',
file='/opt/si/ansible/conf/virtual_host.conf') }}"
On Friday, March 10, 2023 at 10:02:12 AM UTC-5 Todd Lewis wrot
Its a problem with "pexpect" module requirement and it worked after "pip3
install pexpect".
However , now "source ./myenv" is not working
msg": "The command was not found or was not executable: source"
Since source is a shell inbuilt command . Is there a way to overcome it ?
I tried multip
On Friday 10 March 2023 at 16:39:17, Veera wrote:
> Its a problem with "pexpect" module requirement and it worked after "pip3
> install pexpect".
> However , now "source ./myenv" is not working
>
> msg": "The command was not found or was not executable: source"
>
> Since source is a shell in
Even if it worked, its effects will go away as soon as the shell running it
closes. It won't persist to another task.
On Friday, March 10, 2023 at 10:45:06 AM UTC-5 Antony Stone wrote:
> On Friday 10 March 2023 at 16:39:17, Veera wrote:
>
> > Its a problem with "pexpect" module requirement and i
Yes.. I uses Ubuntu 22 . but when executed manually source exists.
Failing when called through the playbook with the mentioned error.
@ToddWill it exists until the next play executes in the same playbook
?
I required the processed source variables for the next
play(on
Thank you Todd.
Many options you have provided. I will go through it and see what works for
my requirement.
On Fri, 10 Mar 2023, 20:14 Todd Lewis, wrote:
> If you mistakenly believe using `ansible-runner` is too much work, then
> you can instead do even more work to put your tasks in blocks wi
Hi,
.I am trying to install a vmare tools on windows machine but noting happen
I manage to copy the file but when I am trying to install I dont see any or
installation running in the background.
---
- hosts: all
tasks:
- name: Copy a single file vmare-tools
ansible.windows.win_copy:
.I am trying to install a vmare tools on windows machine but noting happen
I manage to copy the file but when I am trying to install I don't see any
error or installation running in the background.
---
- hosts: all
tasks:
- name: Copy a single file vmare-tools
ansible.windows.win_cop
It's hard to tell from the mail formatted commands but thoughts off the top
of my head:
1. /S /v"/qn looks like it might need an additional space: /v "/qn
2. Have you tried to register the output of the task and then subsequently
inspect that? If so... what's the output?
3. Have you tried using th
Does command work locally? If can then you may try to create a bat file then trigger it instead?Thanks and Best Regards,Thanh.On 11 Mar 2023, at 07:29, Will McDonald wrote:It's hard to tell from the mail formatted commands but thoughts off the top of my head:1. /S /v"/qn looks like it might need
21 matches
Mail list logo