I have an Ansible (2.13) machine targeting a remote centOS 6 with Python
3.6.
Remote machine has python3.6 installed and variables are set like this:
$ ansible-inventory --host centos-6-vm
{
"ansible_private_key_file": "~/.ssh/id_rsa",
"ansible_python_interpreter": "/usr/bin/pytho
Hello Vladimir,
It does works successfully. Many thanks and highly appreciated.
This thread is RESOLVED.
Thanks... WP
On Thursday, August 4, 2022 at 7:35:34 PM UTC-5 vbo...@gmail.com wrote:
> > On Wednesday, August 3, 2022 at 5:02:16 PM UTC-4 wpgpo...@gmail.com
> wrote:
> > > *general_var.yml
I want to include a defaults, or variable file in the /defaults/main.yml of a
role I am playing
Upon execution I am getting "the defaults/main.yml file for role
'postgres_disable' must contain a dictionary of variables"
== DETAILED ERROR
=
Thanks @utoddl for your time and reply.
when: item.line is not search(omit)
This solution actually worked for me.
Thanks & regards,
FARRUKH
On Friday, August 5, 2022 at 5:22:03 PM UTC+5 uto...@gmail.com wrote:
> That "when:" should be
>
> when: item.line is not search(omit)
>
> On Friday,
That "when:" should be
when: item.line is not search(omit)
On Friday, August 5, 2022 at 8:03:34 AM UTC-4 Todd Lewis wrote:
> - name: "Update Redis Parameters in {{ redis_config_path }}"
> lineinfile:
> path: "{{ redis_config_path }}"
> backrefs: yes
> regexp
- name: "Update Redis Parameters in {{ redis_config_path }}"
lineinfile:
path: "{{ redis_config_path }}"
backrefs: yes
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
when: item.line is match(omit)
with_items:
- { regexp: '^maxmemor
On 05/08/2022 13:31, farrukh ahmed wrote:
Thanks for your reply Vladimir Botka.
This is my actual case:
defaults > main.yml
---
# defaults file for redis_configs
redis_config_path: /etc/redis/redis.conf
# Default Params Values
MAX_MEM: 3000
TCP_KEEPALIVE: 0
TCP_BACKLOG: 511
MAX_CLIENTS: 15000
Thanks for your reply Vladimir Botka.
This is my actual case:
defaults > main.yml
---
# defaults file for redis_configs
redis_config_path: /etc/redis/redis.conf
# Default Params Values
MAX_MEM: 3000
TCP_KEEPALIVE: 0
TCP_BACKLOG: 511
MAX_CLIENTS: 15000
TIMEOUT: 1500
And this is:
Tasks > main
On Thu, 4 Aug 2022 23:43:59 -0700 (PDT)
farrukh ahmed wrote:
> with_items:
> - { regexp: '^text1', line: "text1 = {{ VAR1 }}", when: VAR1 is defined }
> - { regexp: '^text2', line: "text2 = {{ VAR2 }}" }
> - { regexp: '^text3', line: "text3 = {{ VAR3 }}" }
Set *default* to avoid errors, ad