hello all
i need to update /etc/cron.allow on many servers
below is eg
x oracle
y db
x prod
...
..
===
it works for a single node
- name: Add a word in remote file
hosts: temp
remote_user: xx
sudo: yes
tasks:
- name: edit cron.allow
lineinfile:
destfile:
Hi Christopher,
Am trying to work on something where the listdisks module can perfectly
fit, do you mind sharing the code for listdisks module?
On Friday, January 17, 2014 at 1:33:18 PM UTC-8, Christopher O'Connell
wrote:
>
> Hello List,
>
> I understand that a decision has been made to
Hello friends,
Am having a challenge finding a solution to below issue.
I need to generate multiple network files based on single template and the
value of template should change based on the item like IP/NM/GW .
Example
vars:
docker1ip: 1.2.3.4
docker1nm: 255.255.255.1
docker1gw:
{{ netmask }}
GATEWAY={{ gateway }}
Can you help me with this one
On Wednesday, April 26, 2017 at 12:15:13 AM UTC-7, Kai Stian Olstad wrote:
>
> On 26.04.2017 01:19, Kiran Kumar wrote:
> > Am having a challenge finding a solution to below issue.
> > I need to generate multiple n
Hi Friends,
Is there any better way to find if a list of packes is installed or not on
a linux machine. It needs to return something may be a single variable to
decide if all packages are installed or any one of them missed.
Assuming i need to check if below packages are installed or not and
trying to enable by doing a package
> check ?
>
>
> On Tuesday, 9 May 2017 04:05:30 UTC+1, Kiran Kumar wrote:
>>
>> Hi Friends,
>>
>> Is there any better way to find if a list of packes is installed or not
>> on a linux machine. It needs to return something may be
uesday, May 9, 2017 at 3:28:00 PM UTC-7, Dick Davies wrote:
>
> You'd probably get what you want from an Ansible dummy run then, just
> pass '--check' to ansible-playbook.
>
> On 9 May 2017 at 20:09, Kiran Kumar <kira...@gmail.com >
> wrote:
> > Hi Tai Kedzi
Hello
ansible temp -a uptime -vvv
ansible 2.9.1
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules',
u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location
otad|metric|nscd|crond|snpslmd|
> getpwname.pl|mysqld|rsyslogd|xinetd|sendmail|lsf|tigervnc|tightvnc|cfadm"
> |egrep -ve "ps|egrep" |awk "{print \$2}"'
> register: oom
> when: ansible_system == 'Linux'
>- debug: var=oom.stdout
>- name: update the p
rs:
> jmesquery: "[?instance.guest_tools_status ==
> 'guestToolsNotRunning'].instance.hw_name"
>
> - debug:
> msg: "{{ desired_vms }}"
>
>
> On Thu, Apr 9, 2020 at 1:56 PM Abhijeet Kasurde > wrote:
>
>> Hi Kiran,
>>
>> Do you want to r
he VMs which are
> "guestToolsNotRunning" status?
>
>
>
> On Thu, Apr 9, 2020 at 12:53 PM Kiran Kumar > wrote:
>
>> Please suggest how can i add when clause in above, ie when tools status
>> "guestToolsNotRunning" , power off the vm.
>>
>>
>>
I am looking to find vm with 4 CPUs , Please suggest what i am doing wrong
---
## This playbook is for :
- name: Play with Jason Query for learning it
hosts: temp
gather_facts: yes
remote_user: root
tasks:
- name: Gather facts
setup:
register: vm_setup
- name: Get
Please suggest how can get one liner o/p eg what i get with ansible temp -b
-a uptime -o , in below playbook
- hosts: all
gather_facts: true
tasks:
- debug:
var: ansible_all_ipv4_addresses
--
You received this message because you are subscribed to the Google Groups
"Ansible
I got this error for below code - FAILED! => {"msg": "template error while
templating string: expected token 'end of print statement', got '='.
String: {{ var=oom.stdout }}"}
Please suggest , i am trying to get pid from shell cmd & then update it
with echo
- hosts: temp
> gather_facts:
Please suggest how can i add when clause in above, ie when tools status
"guestToolsNotRunning" , power off the vm.
- hosts: localhost
gather_facts: false
connection: local
vars_files:
- ./vars/vmware_vars.yml
vars:
vm_list:
- vm1
tasks:
- name: Gather VM info
In jason query how can i add regular expression ? eg if have vm1, vm2,vm3
below query can be adjusted ? eg query: "[?guest_name == 'vm*' ]" ,
seems does not work in below case
https://jmespath.org/specification.html#filterexpressions i tried few
things but no luck
Thanks
---
> -
"'str object' has no attribute
'guest_name'"}
On Saturday, April 11, 2020 at 10:02:06 PM UTC-7, Vladimir Botka wrote:
>
> On Sat, 11 Apr 2020 21:26:28 -0700 (PDT)
> Kiran Kumar > wrote:
>
> > In jason query how can i add regular expression ? eg if have vm1,
>
[],
"uuid": "xx",
"vm_network": {
"xx": {
"ipv4": [
"xx"
],
"ipv6":
Use https://onlineyamltools.com/validate-yaml
This will help you validate the syntax
On Saturday, April 18, 2020 at 2:26:10 PM UTC-7, Tony Wong wrote:
>
> this is what i have. but still not working
>
> On Sat, Apr 18, 2020 at 1:55 PM David Foley > wrote:
>
>> Why Aren't you using your Local
ven VM
> vmware_guest_powerstate:
> validate_certs: False
> hostname: '{{ vcenter_hostname }}'
> username: '{{ vcenter_username }}'
> password: '{{ vcenter_password }}'
> folder: /Asia-Datacenter1/vm/
> name: "{{ item }}"
> state: 'reboot-guest'
> with_items
>> loop: "{{ vm_facts.virtual_machines }}"
>> when:
>> - item.guest_name | regex_search('^vm')
>>
>>
>> On Sun, Apr 12, 2020 at 5:26 PM Vladimir Botka > > wrote:
>>
>>> On Sun, 12 Apr 2020 00:26:39 -0700 (PDT)
>>
Hi
I need to check status of VMware tools on vms & if VMware tools are not
running, then reboot the vm. I have below playbook which works fine to find
vm name & VMware tools status. Please help on how can i extract the vm name
& take action as per status.
Note : i have to use the VMware
Hi,
I have a ansible server, which i use mainly to manage ntp client/dns
client/time zone/create users/install software etc on various linux
servers.. so no development to say, just as "infrastructure as code"
On same server i installed Jenkins & on Jenkins i installed ansible plugin.
Now i
more
>> response from a support forum on Jenkins.
>>
>> On Sun, 3 May 2020 at 04:59, Kiran Kumar wrote:
>>
>>> Hi,
>>>
>>> I have a ansible server, which i use mainly to manage ntp client/dns
>>> client/time zone/create users/install software et
Anyways i did below
1017 21/05/20 17:47:19 yum remove python-kerberos-1.1-15.el7.x86_64
1018 21/05/20 17:49:29 rpm -qa|grep -i kerb
1019 21/05/20 17:49:43 pip install pykerberos
1020 21/05/20 17:49:55 pip install requests-kerberos
1021 21/05/20 17:50:05 ansible windows -m win_ping
Thanks for the reply
You mean :
yum remove -y krb5-devel krb5-libs krb5-workstation
And
re-run
*pip install pykerberos*
On Thursday, May 21, 2020 at 5:37:40 PM UTC-7, Jordan Borean wrote:
>
> The issue here is the kerberos library you have installed is either too
> old or
I used a fresh box & finally did below & wored
yum install -y python3-devel
pip install pykerberos
Thanks @Jordan
On Thursday, May 21, 2020 at 5:37:40 PM UTC-7, Jordan Borean wrote:
>
> The issue here is the kerberos library you have installed is either too
> old or incompatible with what
Shall i do below
yum remove python-kerberos-1.1-15.el7.x86_64
=
Package
Hi,
Goal : Use Linux centos 7.8 server with ansible version 2.9.7 to manage
windows 2019 server
Error : WINRM CONNECTION ERROR: function takes at most 2
arguments (3 given)
###
Ansible Version :
ansible 2.9.7
config file = /etc/ansible/ansible.cfg
I would suggest - https://galaxy.ansible.com/MindPointGroup/RHEL7-CIS/
On Thu, Sep 10, 2020 at 1:26 AM Josephsimon Arokiaraj
wrote:
> Hi All,
>
> How you doing?
>
> Do we have any playbooks/roles for doing audit and remediation on CIS
> benchmarks for Rhel 7?
>
> Cheers,
> Joseph
>
> --
> You
Hello
I am getting error below
"msg": "kerberos: HTTPSConnectionPool(host='win-xx.ca.local', port=5986):
Max retries exceeded with url: /wsman (Caused by SSLError(SSLError(1,
u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
(_ssl.c:618)'),))",
Details :
ansible 2.9.9
Thanks ! that was it
Nice catch ...
On Tuesday, June 2, 2020 at 12:49:08 AM UTC-7, Jordan Borean wrote:
>
> The key you want to use is ‘ansible_winrm_server_cert_validation’, you
> were missing the server part
>
Hi
I do not want to use GIT for version control , so i am going to backup my
playbooks .. only if this is changed copy the yml file with date ...
I see copy module can do it
- name: Copy a new "ntp.conf file into place, backing up the original if it
differs from the copied version
copy:
Hi
I have setup the plugin for forman
https://raw.githubusercontent.com/theforeman/foreman_ansible/master/extras/foreman_callback.py
Also install below on ansible control node
yum install -y python-pip
pip install requests
the plugin file is updated
from __future__ import
quot;msg": "A vault password or secret must be
specified to decrypt /etc/ansible/playbooks/windows/local-user-add.yml"}
...
copy seems does not like valuted files ... ?
On Wednesday, July 29, 2020 at 7:07:24 PM UTC-7, Kiran Kumar wrote:
>
> Hi
>
> I do not want to
What is error you get ?
On Sun, May 2, 2021 at 08:59 Zeynal Hajili wrote:
> Hello team,
>
> I am very new to Ansible and i am trying to install Ansible on my MacOS
> BigSur.
>
> I followed official guide and tried to install it with following logs.
>
> MacBook-Pro:*~*$* python3 -m pip install
with_items:
- "{{ foo }}"
###
{"msg": "template error while templating string: expected token 'end of
print statement', got 'r'. String: {{ r.ansible_facts.ansible_distribution
r.ansible_facts.ansible_distribution_version }}"}
########
facts.ansible_distribution_version }}"
>
> On Wed, Feb 24, 2021 at 3:36 PM Kiran Kumar wrote:
>
>>
>> Setup gives :
>>
>> "ansible_distribution": "Ubuntu",
>> "ansible_distribution_file_parsed": true,
>>
Ok this one was easy .. just did below
value: "{{ r.ansible_facts.ansible_distribution }}{{
r.ansible_facts.ansible_distribution_version }}"
Thanks again Abhi & Stefan Hornburg (Racke)
On Wed, Feb 24, 2021 at 10:11 AM Kiran Kumar wrote:
> "{{ r.ansible_fact
Thanks Abhijit, Awesome , it worked
Only issue is
value: "{{ r.ansible_facts.ansible_distribution }}"
when: vm_info.instance.customvalues.OS !=
r.ansible_facts.ansible_distribution
that Just give Ubuntu ... is it possible to extract the info from setup
module ie below part..
Wow r.ansible_facts.ansible_lsb.description did worked !!! Thanks again
Abhijit
On Wed, Feb 24, 2021 at 12:17 AM Kiran Kumar wrote:
> Thanks Abhijit, Awesome , it worked
>
> Only issue is
>
> value: "{{ r.ansible_facts.ansible_distribution }}"
> when: vm_i
This playbook check OS & then run diff cmd per OS & works fine
But the Debug output is not compact .. it is verbose mode kind.. if the OS
is not say CentOS it gives 4 to 5 lines stating the same .. the out is not
compact .. somehow is it possible to ignore that .. so mat be debug is not
the way
42 matches
Mail list logo