you can set in ansible.cfg to look up for roles.
On Wednesday, July 31, 2019 at 11:50:48 AM UTC+5:30, Михаил Политаев wrote:
>
> If import_role cannot look to level up directories how we can avoid
> repeating myself with again and again writing base things which want to be
> included on all rol
Guies Anyone help one this.
On Tuesday, July 30, 2019 at 7:45:12 PM UTC+5:30, Kunalsing Thakur wrote:
>
> The following Result:-
>
> TASK [debug]
> ***
> task path: /etc/ansible/playbooks/test.yaml:5
pmversion']['stdout']", "delta":
"0:00:01.219563", "end": "2019-07-30 14:14:25.187306", "rc": 0, "start":
"2019-07-30 14:14:23.967743", "stderr": "", "stderr_lines": [], "
---
- name: RollBack Rpm versions for {{ service_name }}
hosts: local
connection: local
gather_facts: false
tasks:
- name: Getting host list from ipa
shell: /etc/ansible/playbooks/hostfind.sh
- name: Creating in memory inventory group for {{ nodetype }} in
ansible playbook
missed export
name: adding extra path
shell: PATH=$PATH:{{item}} && export PATH
with_items:
- /usr/lib/jvm/java-8-openjdk-amd64/jre/bin
- /usr/lib/jvm/java-8-openjdk-amd64/bin
On Thu, Jul 11, 2019 at 8:07 PM Kunalsing Thakur
wrote:
> name: adding extra path
> shell: PAT
oups.google.com/d/msgid/ansible-project/40b82b91-ae76-4eea-b62f-e077f4c61814%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
[image: --]
kunalsing thakur
[image: https://]about.me/kunalsingthakur
<
aybooks/test.yaml:10
ok: [127.0.0.1] => (item={'value': 2.4, 'key': u'apache'}) => {
"msg": "rpmname is apache and value is 2.4"
}
ok: [127.0.0.1] => (item={'value': 2.8, 'key': u'httpd'}) => {
"msg": "rpmname is httpd and value is 2.8"
}
META: ran han
Hello ansible team can anyone suggest?
On Wed, 10 Jul 2019, 20:32 Kunalsing Thakur,
wrote:
> file.txt
>
> rpmname: version
> rpmname: version
>
>
>
>
> Playbook:-
> - hosts: all
> gather_facts: false
> tasks:
> - name: store the value
>
file.txt
rpmname: version
rpmname: version
Playbook:-
- hosts: all
gather_facts: false
tasks:
- name: store the value
shell: cat /etc/ansible/playbooks/file.txt
register: versions
- name: Ansible Dictionary variable Example
debug:
msg: "rpmname is {{ item.key}} and va
Check this out.
https://github.com/Tomorrow9/ansible/commit/423d6391a5cba4b188719de7c65e7c550326d82c
On Wed, 29 May 2019, 21:01 Veera, wrote:
> Hi,
>
> I am using the following snippet as part of a play.
> I have to refresh the yum repository list as I will replace the
> repository file every
Greetings !
Hello Ansible team,
Can anyone look into this?
On Wednesday, May 22, 2019 at 4:37:30 PM UTC+5:30, Kunalsing Thakur wrote:
>
> Hello Ansible Team,
>
>
> I need to run playbook on host when puppet run done on node and then it
> will immediately restore the snap
agent -tdv
post_tasks:
- include: vmware_snapshot_revert.yaml
But its not worked because we are calling this playbook from remote node
which is not possible. so how to handle this situtation
On Wednesday, May 22, 2019 at 4:37:30 PM UTC+5:30, Kunalsing Thakur wrote:
>
> Hello Ansibl
https://github.com/weareinteractive/ansible-ssh
On Wednesday, May 22, 2019 at 3:05:22 PM UTC+5:30, Vinu Vajravel wrote:
>
> i want to change few words and restart ssh service , is there any playbook
> available ?
>
> appreciate your help.
>
> Thanks
> Vinu .
>
--
You received this message beca
Hello Ansible Team,
I need to run playbook on host when puppet run done on node and then it
will immediately restore the snapshot. and again it will run puppet. can we
pass the control to task when second task is completed it will move to
first one
- hosts: node1, node2, node3
vars_files:
ignore this thread.
Hey guies ignore i just paste typo in all hostname all working fine.
On Thu, May 16, 2019 at 6:08 PM Kunalsing Thakur
wrote:
> https://github.com/ansible/molecule/issues/2044
>
> Molecule and Ansible details
>
> dependency:
> name: galaxy
> dri
https://github.com/ansible/molecule/issues/2044
Molecule and Ansible details
dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
platforms:
- name: nocon01p2
hostname: nocon01p2.example.com
image: centos/systemd:1.0
pre_build_image: True
privileged: True
Can you show me one example of your hosts file from one of node
On Mon, 29 Apr 2019, 15:00 I do not have a DNS server, hence the need to manually update the
> /etc/hosts file. This a small network with less than 50 clients.
>
>
> On Monday, April 29, 2019 at 5:07:56 AM UTC-4, Kuna
e /etc/hosts. I haven't been able to figure
> out how to look at the existing servers in the host file and only add new
> servers.
>
>
>
> On Sunday, April 28, 2019 at 5:53:36 AM UTC-4, Kunalsing Thakur wrote:
>>
>> Yes. Use copy module. I hope so you are referr
eate a playbook that references that master file to send
> to all nodes as reference to update their /etc/hosts file.
> Is that possible?
>
>
> On Sunday, April 28, 2019 at 5:43:06 AM UTC-4, Kunalsing Thakur wrote:
>>
>> If I understand correctly the master file you are tal
If I understand correctly the master file you are talking about is playbook
term in ansible. The playbook has all information related to hosts and
deployment instruction. You can give the Input in playbook and it will
modify the stuff accordingly.
On Sun, 28 Apr 2019, 15:09 I hope I am posting th
14 Apr 2019, 09:34 Kunalsing Thakur, > wrote:
>
>> - hosts: test.example.com, test1.example.com
>> gather_facts: false
>> tasks:
>> - name: checking uptime for {{ ansible_hostname }}
>> command: uptime
>> when: ( "slave" in urir
One more thing i don't want to use gather_facts: true
On Sunday, April 14, 2019 at 9:34:45 AM UTC+5:30, Kunalsing Thakur wrote:
>
> - hosts: test.example.com, test1.example.com
> gather_facts: false
> tasks:
> - name: checking uptime for {{ ansible_hostname }}
&
- hosts: test.example.com, test1.example.com
gather_facts: false
tasks:
- name: checking uptime for {{ ansible_hostname }}
command: uptime
when: ( "slave" in uriresult.content )
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To
]
stdout: "\e[0m"
stdout_lines:
This issue is resolved now. :)
On Wed, Apr 3, 2019 at 9:32 PM Kunalsing Thakur
wrote:
> Hi sebastian,
> pulp.results.0.stdout give me output "\e[0m"
>
> But when I try to access in failed_when condition
> It is giving me
stderr_lines: []
stdout: "\e[0m"
stdout_lines:
This issue is resolved now. :)
On Sat, Apr 6, 2019 at 3:28 PM Kunalsing Thakur
wrote:
> Hello Matt,
>
> i tried with task
>
> - name: searching the rpm into {{ reponame }} repo
> shell: pulp-admin rp
project/CACVha7crqc5aH3pSvFUhHeMt6JG4GZfS2G6g-e6qwfVdWO7Z%2BA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
[image: --]
kunalsing thakur
[image: https://]about.me/kunalsingthakur
<https://about.me/kunalsin
}}"
> register: pulp
> when: rpmsearch is defined
> failed_when: escape in pulp.results.[0].stdout
> vars:
> escape: "\u001b[0m"
>
>
> On Fri, Apr 5, 2019 at 1:12 PM Kunalsing Thakur
> wrote:
>
>> Gentle reminder, is anyone can he
Gentle reminder, is anyone can help on this
--
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.com.
To post to this grou
ansible task not failed still its passing.
On Thu, Apr 4, 2019 at 2:20 PM Kunalsing Thakur
wrote:
> Hi kai,
> thanks for information.
> i tried below condition
> failed_when: pulp.stdout == "\\e[0m"
> failed_when: pulp.stdout == '\e[0m'
>
in pulp.stdout"
i tried all stuff but no luck
any new suggestion ?
On Thu, Apr 4, 2019 at 1:38 PM Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:
> On 04.04.2019 09:47, Kunalsing Thakur wrote:
> > - name: Logging into pulp
> > shell: pulp-admin login -u admin -p a
n: search is defined
failed_when: pulp.stdout == "\e[0m"
Also i tried to use this one.
But ansible task will pass without fail.
On Thu, Apr 4, 2019 at 1:10 PM Kunalsing Thakur
wrote:
> can you tell me what should be written in role? i am trying to understand
> but can
can you tell me what should be written in role? i am trying to understand
but can't intepret in role.
On Thu, Apr 4, 2019 at 1:06 PM Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:
> On 04.04.2019 08:25, Kunalsing Thakur wrote:
> > Hi Brian,
> > I have reg
or is there way we can compare empty string.
On Thursday, April 4, 2019 at 12:30:45 PM UTC+5:30, Kunalsing Thakur wrote:
>
> Hello Team,
> When i was checking for string comparison in failed_when condition.
> the ansible task does not give any output if search is not found. bu
Hello Team,
When i was checking for string comparison in failed_when condition.
the ansible task does not give any output if search is not found. but it
will print stdout variable as stdout: "\e[0m"
But when i try to compare my ansible playbook gives error.
I tried two ways in codition:-
1) fa
is there any example which i refer like this to get sorted out?
On Thu, Apr 4, 2019 at 11:55 AM Kunalsing Thakur
wrote:
> Hi Brian,
> I have registered results. i am able to access the content using
> pulp.results.[0].stdout. if nothing is found stdout prints this "\e[0m&quo
il to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CACVha7ec-JCvmHLeMW%2BAjFUWqu4J9bnP6-uMh0oD5e-vU8k8iA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
[im
he error was: error while evaluating conditional (pulp.results.0.stdout ==
"\e[0m"): ''dict object'' has no attribute ''results'''
Looks like in faiked_when condition it needs dictionary?
On Wed, 3 Apr 2019, 20:18 Kunalsing Thakur when i pr
ror while evaluating conditional (pulp.results.0.stdout ==
"\e[0m"): ''dict object'' has no attribute ''results'''
On Wed, 3 Apr 2019, 20:46 Raghavendra Rao I see you used debug to get a verbose out from that specific command.
>
> Do
+ (0:00:02.206) 0:00:09.036
***
ok: [inplp01p2.infra.smf1.mobitv] =>
pulp.results.0.stdout: "\e[0m"
which is blank so i want to failed this task?
On Wednesday, April 3, 2019 at 8:14:31 PM UTC+5:30, Kunalsing Thakur wrote:
>
> Hi sebastian,
> when i try to f
he error was: error while evaluating conditional (pulp.results.0.stdout ==
"\e[0m"): ''dict object'' has no attribute ''results'''
On Wednesday, April 3, 2019 at 8:01:59 PM UTC+5:30, Sebastian Meyer wrote:
>
> On 03.04.19 16:22, Kunalsing Thaku
when: rpmsearch is defined
> ignore_errors: yes
>
> - name: invoke failure
> fail:
> when: pulpresult.stdout == "\e[0m"
>
> -R.Rao
>
> On Wed, 3 Apr 2019 at 19:24, Kunalsing Thakur > wrote:
>
>> Can anyone help on this?
>>
Thank You sebastian. Now i am able to print stdout using
pulp.results.0.stdout
On Wed, Apr 3, 2019 at 8:01 PM Sebastian Meyer wrote:
> On 03.04.19 16:22, Kunalsing Thakur wrote:
> > ---
> > - name: Logging into pulp
> > shell: pulp-admin login -u admin -p admin
> >
> command: pulp-admin rpm repo content rpm --repo-id=mobi-snapshots
> --match 'filename={{ item }}'
> loop: "{{ rpmname | default([]) }}"
> register: pulpresult
> when: rpmsearch is defined
> ignore_errors: yes
>
> - name: invoke failure
> fail:
&g
pulpresult
> when: rpmsearch is defined
> ignore_errors: yes
>
> - name: invoke failure
> fail:
> when: pulpresult.stdout == "\e[0m"
>
> -R.Rao
>
> On Wed, 3 Apr 2019 at 19:24, Kunalsing Thakur
> wrote:
>
>> Can anyone help on this?
>&g
playbook:-
task:-
- name: Deploying PCC-test
hosts: pulp
gather_facts: true
vars_files:
- /etc/ansible/inventories/group_vars/common.yaml
vars:
- rpmsearch: true
- rpmname:
- mobi-auth-manager-5.42.0-201903291228.ed4d6a0.noarch
serial: 1
any_errors_fatal: true
role
Can anyone help on this?
On Wednesday, April 3, 2019 at 7:15:25 PM UTC+5:30, Kunalsing Thakur wrote:
>
> playbook:-
> ---
> - name: Deploying PCC-test
> hosts: inplp01p2.infra.smf1.mobitv
> gather_facts: true
> vars_files:
> -
> /etc/ansible/inventori
playbook:-
---
- name: Deploying PCC-test
hosts: inplp01p2.infra.smf1.mobitv
gather_facts: true
vars_files:
-
/etc/ansible/inventories/mobitv/paytv.smf1.mobitv/group_vars/common.yaml
vars:
- rpmsearch: true
- rpmname:
- kunal
serial: 1
any_errors_fatal: true
roles
Hello Ansible Team,
Is there any update on issue.
This is important.
On Tuesday, October 2, 2018 at 7:43:54 PM UTC+5:30, Kunalsing Thakur wrote:
>
> Guies is there any update or you need any information.
>
> On Tue, 2 Oct 2018, 09:54 Kunalsing Thakur,
> wrote:
>
>> If
Guies is there any update or you need any information.
On Tue, 2 Oct 2018, 09:54 Kunalsing Thakur,
wrote:
> If you see my playbook and ansible-playbook its work fine for passing
> parameter but if I pass no value the task has to be skipped
>
> On Tue, 2 Oct 2018, 09:18 Jonathan
10:46 PM Kunalsing Thakur
> wrote:
>
>> Is there anyone can help on this
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving
When I am passing servicename parameter as [] the task has to be skipped.
But it is giving error
On Tue, 2 Oct 2018, 09:18 Jonathan Lozada De La Matta,
wrote:
> what is exactly the issue? you need to provide more information.
>
> On Mon, Oct 1, 2018 at 10:46 PM Kunalsing Thakur
Is there anyone can help on this
--
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.com.
To post to this group, send ema
# SUMMARY
When I want to use skip the task if the extra-vars parameter is passed like
default [] in playbook from the role
# ISSUE TYPE
- Bug Report
# COMPONENT NAME
ansible-core
# ANSIBLE VERSION
```
ansible 2.6.1
config file = /etc/ansible/playbooks/example/ansible.cfg
Hi Brian,
As you suggested its worked for input parameter but not for default it
giving failed task
- name: Reloading Service
service:
name: "{{ item }}"
state: reloaded
with_items: "{{ servicename.split(',') |
ternary((servicename|default('')).split(','),[]) }}"
Output result.
ans
Brian Can you help me?
what can add in with_items?
On Thursday, September 27, 2018 at 10:31:08 PM UTC+5:30, Brian Coca wrote:
>
> just substitute for notdefined
>
>
>
> --
> --
> Brian Coca
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Proj
Hi Brian,
i have defined like this:-
- name: Reloading Service on {{ansible_fqdn}}
service:
name: "{{ item }}"
state: reloaded
with_items: "{{ servicename.split(',') |
ternary((notdefined|default('')).split(','),[]) }}"
fatal: [node1]: FAILED! =>
msg: '''list object'' has no attr
On Thursday, September 27, 2018 at 10:57:15 PM UTC+5:30, Kunalsing Thakur
wrote:
>
> if i did not pass servicename while running ansible-playbook it will skipp
> the service task
> and if i pass servicename the service will reloaded and check whether
> service is running o
if i did not pass servicename while running ansible-playbook it will skipp
the service task
and if i pass servicename the service will reloaded and check whether
service is running or not.
On Thursday, September 27, 2018 at 10:46:55 PM UTC+5:30, Kunalsing Thakur
wrote:
>
> Like this.
&g
Like this.
- name: Reloading Service on {{ansible_fqdn}}
service:
name: "{{ item }}"
state: reloaded
with_items: "{{ (notdefined is
defined)|ternary((notdefined|default('')).split(','),[]) }}"
But i don't see servicename there.
Can you just write one line of with_items so that i can
Can you help me
On Thu, 27 Sep 2018, 19:49 Kunalsing Thakur,
wrote:
> where i can define servicename in last condition
>
> On Thursday, September 27, 2018 at 7:31:02 PM UTC+5:30, Brian Coca wrote:
>>
>> You are not using |default correctly, the split needs a defined
&
where i can define servicename in last condition
On Thursday, September 27, 2018 at 7:31:02 PM UTC+5:30, Brian Coca wrote:
>
> You are not using |default correctly, the split needs a defined
> variable to work on:
>
> with_items: {{ (servicename|default('')).split(',') }}
>
> That still create
Brian Can you just edit the playbook and show me how is going to work?
On Thursday, September 27, 2018 at 7:31:02 PM UTC+5:30, Brian Coca wrote:
>
> You are not using |default correctly, the split needs a defined
> variable to work on:
>
> with_items: {{ (servicename|default('')).split(',') }}
So r u saying like this.
- name: Reloading Service on {{ansible_fqdn}}
service:
name: "{{ item }}"
state: reloaded
with_items: "{{ (notdefined is
defined)|ternary((notdefined|default('')).split(','),[]) }}"
register: result
- name: checking the service status on {{ansible_fqdn}}
# SUMMARY
When i want to use specific tag in playbook from role it will run all task
which is defined in role.
# ISSUE TYPE
- Bug Report
# COMPONENT NAME
ansible-core
# ANSIBLE VERSION
```
ansible 2.6.1
config file = /etc/ansible/playbooks/example/ansible.cfg
configured mo
64 matches
Mail list logo