On 1/23/20 12:24 AM, RobertF wrote:
> I have an Ansible playbook for provisioning servers. After the server is
> provisioned, I want to remove the old FQDN
> and/or hostname alias for that server from my local SSH known_hosts file,
> pause until the server is up, and then run the
> ssh-keyscan
Kindly Help me on this as i am stuck
On Thursday, January 23, 2020 at 2:49:28 AM UTC+5:30, Rakesh Parida wrote:
>
> Hi Ansible Gurus,
>
> I have created a list and from that list i want to prepare some customise
> list as per my need.
> But when i execute my playbook i get at last step when i
I have Ansible and Jenkins on Windows but on different servers how can i
establish a connection between this two to trigger a playbook based on
inventory files
What is the inventory path to be given?
My inventory file is as shown below
[win]
10.96.43.61
10.96.43.177
[win:vars]
I played around some more and was able to figure it out. thanks for
teaching me how to fish.
On Wed, Jan 22, 2020 at 4:35 PM Mike V wrote:
> Works great! I never used templates, just a little bit more help, how do
> I export the host variables and group variables too?
> Thank you!
>
> On Wed,
Works great! I never used templates, just a little bit more help, how do I
export the host variables and group variables too?
Thank you!
On Wed, Jan 22, 2020 at 4:20 PM Vladimir Botka wrote:
> On Wed, 22 Jan 2020 16:10:42 -0800
> Mike V wrote:
>
> > I have a playbook that generates in-memory
On Wed, 22 Jan 2020 16:10:42 -0800
Mike V wrote:
> I have a playbook that generates in-memory inventory. The hosts are part
> of multiple groups. Is there a module or easy way to export the in-memory
> inventory to an output file?
Yes. It is. For example use this template
{% for group in
I have a playbook that generates in-memory inventory. The hosts are part
of multiple groups. Is there a module or easy way to export the in-memory
inventory to an output file?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe
Hi Jordan, thanks for explaining. My question was referenced to the
playbook that you gave me as it says *Upgrades*. I thought if we run this
it is automatically going to upgrade everything in windows host but it
didn't.
tasks:
- name: Install all security, critical, and rollup updates
Please read through the doc for win_updates again
https://docs.ansible.com/ansible/latest/modules/win_updates_module.html.
I've told you multiple times why updates can be filtered and in your case
it's because the categories you specify don't match up with the updates
that are available. Even
I have an Ansible playbook for provisioning servers. After the server is
provisioned, I want to remove the old FQDN and/or hostname alias for that
server from my local SSH known_hosts file, pause until the server is up,
and then run the ssh-keyscan command to add the new server's public SSH
why did it filter this time? I don't understand...
---
- hosts: windows
vars:
ansible_connection: winrm
ansible_ssh_port: 5986
anisble_winrm_transport: kerberos
ansible_winrm_server_cert_validation: ignore
validate_certs: false
ansible_winrm_scheme: https
1. Well we provided *reboot: yes * doesn't it suppose to make mandatory
reboot by itself?
2. I used the same playbook to a different instance. For some reason, it
filtered out the required information but didn't install.
root@ip-10-0-2-209:/etc/ansible/windows-playbook# ansible-playbook
According to
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/hh968413(v=vs.85),
the HRESULT value 0x80240016 corresponds to WU_E_INSTALL_NOT_ALLOWED
Operation tried to install while another installation was in progress or
> the system was pending a mandatory restart.
>
On Wed, 22 Jan 2020 21:49:43 +0100
Vladimir Botka wrote:
> The task below does the job
>
> - set_fact:
> result_list: "{{ result_list|
> default([]) + [
> dict(keys|
> zip(keys|
>
root@ip-10-0-2-209:/etc/ansible/windows-playbook# ansible-playbook
upgrades.yml -vvv
ansible-playbook 2.9.2
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 =
*I ran through an error *
*here is the playbook : - *
---
- hosts: windows
vars:
ansible_connection: winrm
ansible_ssh_port: 5986
anisble_winrm_transport: kerberos
ansible_winrm_server_cert_validation: ignore
validate_certs: false
ansible_winrm_scheme: https
So read your filtered updates list, you can see both updates are in there
ok: [MQN-CKMH5E31UM7.corp.medqia.com] => {
"changed": false,
"filtered_updates": {
"20668013-76d9-43ec-a6f2-f76fb4271642": {
"categories": [
"Definition Updates",
> Take a look again at the example in
> https://docs.ansible.com/ansible/latest/modules/import_playbook_module.html.
>
> To me it does not know where
>
>
> roles:
> - role: testrole1
> tags: testrole1
>
> belongs. Should it be
>
> - hosts: mywebservers
> gather_facts:
Attached is the target host and it shows that it needs to be updated. I
have provided the update in KB number but it's not working. and it's not
rebooting too.
[image: target host.PNG]
On Wed, Jan 22, 2020 at 1:17 PM Jordan Borean wrote:
> Have a look through your output, the
Hi Ansible Gurus,
I have created a list and from that list i want to prepare some customise
list as per my need.
But when i execute my playbook i get at last step when i want to see my
customised list i get an error .
Can someone guide me where i am doing wrong.
TASK [Display Lists]
Have a look through your output, the "filtered_updates" key show all the
updates that the Windows Update Agent can find and also displays why they
have been filtered in the win_updates task. So there's nothing the
win_updates module is set to do because Windows is reporting no updates are
On Wed, Jan 22, 2020 at 3:47 PM Xinhuan Zheng wrote:
>
> Hello,
>
> I created a playbook which needs to call another playbook. This is my current
> playbook:
>
> ---
> # file: current_playbook.yml
>
> - hosts: mywebservers
> gather_facts: yes
>
> #- import_playbook: another.yml
>
> roles:
>
*Can you give me an example that how to specify the category KB update
applies too*
*Here is the output: - *
ansible-playbook windows.yml -vvvansible-playbook 2.9.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules',
On Wed, 22 Jan 2020 10:32:56 -0800 (PST)
jean-christophe manciot wrote:
> list:
> - key1:
> - 'abc'
> - 'def'
> key2: 'ghi'
> key3: 'jkl'
> - key1:
> - 'mno'
> - 'pqr'
> key3: 'stu'
> key4: 'dfg'
> - key1:
>
Hello,
I created a playbook which needs to call another playbook. This is my
current playbook:
---
# file: current_playbook.yml
- hosts: mywebservers
gather_facts: yes
#- import_playbook: another.yml
roles:
- role: testrole1
tags: testrole1
post_tasks:
- name: Install
That's probably because win_updates runs on various filters, you can't just
specify the KB, you also need to specify the category the update applies
to. If you run with -vvv you can see all the updates that have been
filtered (skipped) and the categories they apply to. If the update is not
in
But the target host has not achieved the desired result like it's not
updating/upgrading the OS based on KB number provided and is not rebooting.
Any ideaa?
On Wednesday, January 22, 2020 at 12:21:15 PM UTC-8, Jordan Borean wrote:
>
> It's showing OK because there was the state was already
It's showing OK because there was the state was already achieved. Ansible
is running and the modules you are running with just have nothing to do.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop
On 22.01.2020 19:55, Vladimir Botka wrote:
On Wed, 22 Jan 2020 19:15:27 +0100
Kai Stian Olstad wrote:
> - name: add host
> add_host:
> name: 'test'
> groups: all
There is no point in adding a host to all, the all group are a special
group that all hosts is a member of.
The
Nothing changed on the target host, not even rebooted but able to ping and
can do a handshake
Playbook -
PLAY [windows]
*
TASK
On Wed, 22 Jan 2020 19:15:27 +0100
Kai Stian Olstad wrote:
> > - name: add host
> > add_host:
> > name: 'test'
> > groups: all
> There is no point in adding a host to all, the all group are a special
> group that all hosts is a member of.
The point is to add a host that hasn't
*ansible 2.9.4*
Let's assume the following list of dictionaries:
list:
- key1:
- 'abc'
- 'def'
key2: 'ghi'
key3: 'jkl'
- key1:
- 'mno'
- 'pqr'
key3: 'stu'
key4: 'dfg'
- key1:
- 'vwx'
- 'yza'
On 22.01.2020 18:46, Punit Jain wrote:
run.yml
--
---
- hosts: all
connection: local
gather_facts: no
tasks:
- name: include role task
include_role:
name: role1
tasks_from: hello
- hosts: all
connection: local
gather_facts: no
tasks:
- name:
In below usecase it is not working:
run.yml
--
---
- hosts: all
connection: local
gather_facts: no
tasks:
- name: include role task
include_role:
name: role1
tasks_from: hello
- hosts: all
connection: local
gather_facts: no
tasks:
- name:
Dick,
Thanks for the suggestion.
We use visudo for editing the sudoers file in the first place. So if any
mistakes made we could catch up in the first place.
Your suggestion is the good one, and I like it.
Frank
On Tuesday, January 21, 2020 at 9:07:45 PM UTC-5, FRANK L wrote:
>
> Hi,
>
On Wed, 22 Jan 2020 21:32:54 +0530
Punit Jain wrote:
> - hosts: all
> connection: local
> gather_facts: no
>
> tasks:
> - name: add host
> add_host:
> name: 'testserver'
> groups: all
>
> - name: refresh
> meta: refresh_inventory
>
> - name: print
Yea you are right. I am hitting this bug and I can't see myself pulling
this off.
I'll just go with the pubkey method although I wanted to avoid it because I
have lots of network devices. But no choice here because Ansible is not
going to work without SSH keys on these IOS versions.
FYI,
This
Hi,
I am doing a very straight forward testing of adding a new host dynamically.
---
- hosts: all
connection: local
gather_facts: no
tasks:
- name: add host
add_host:
name: 'testserver'
groups: all
- name: refresh
meta: refresh_inventory
- name:
Hi Michael,
Thanks for the tip. Yes, it works.
Frank
On Tuesday, January 21, 2020 at 9:07:45 PM UTC-5, FRANK L wrote:
>
> Hi,
>
> I would like to use git for managing Ansible playbooks for version control
> on an admin server in GCP. So the idea is this:
> each user in the admin group
Also, use the 'validate' parameter when you're deploying sudoers files.
Without this, mistakes can cause you to completely lose access.
On Wed, 22 Jan 2020 at 03:07, FRANK L wrote:
> Hi,
>
> I would like to use git for managing Ansible playbooks for version control
> on an admin server in
https://docs.ansible.com/ansible/latest/modules/hostname_module.html
On Wed, 22 Jan 2020 at 09:17, דודו דודו wrote:
> Hi,
> I would like to update hostname based on server IP.
> In my ansible host, I have a group that includes 5 servers IP, for each
> server, I will need to define
Hi Sandy,
The issue is with indentation
Under tasks you have to give two white space to make it indent
Try following
tasks:
- name: something
Let me know if you have any issue.
Thanks,
Vivek
On Wed, Jan 22, 2020, 2:31 PM Sandy Hung wrote:
> ERROR! unexpected parameter type in
I only removed the SSH key to remove pub key authentication from the router. As
it’s the first authentication protocol used, the ansible command was ignoring
the passed in username/password.
It was for testing only. Your router config does pub key -> kbd interactive ->
password authentication
ERROR! unexpected parameter type in action:
The error appears to be in '/home/sandy/phpldapadmin.yml': line 8, column
6, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: install phpopenldap
^ here
Hi,
I would like to update hostname based on server IP.
In my ansible host, I have a group that includes 5 servers IP, for each
server, I will need to define hostname name based on the IP.
[web server]
130.1.1.1
130.1.1.2
130.1.1.3
130.1.1.4
130.1.1.5
130.1.1.1 >> web-1
130.1.1.2 >> web-2
[ansible@Netauto-Dev new_vlan]$ ansible -m ios_command -e commands='sh ip
int br' -i /etc/ansible/inventory/ R-TEST-SNIF -e
'ansible_connection=network_cli' -e 'ansible_network_os=ios' -e
'remote_user=ansible' -k
SSH password:
[WARNING]: Found variable using reserved name: remote_user
46 matches
Mail list logo