[ansible-project] Setting user password via ansible module user didn't work as expected

2016-06-24 Thread Jörg Kastning
Hello, I'm very new to ansible. So, please bare with me if I ask some beginners questions. I try to set a user password using the ansible ad-hoc mode with the user-module . To generate the password has I use the python command mentioned in the

Re: [ansible-project] Setting user password via ansible module user didn't work as expected

2016-07-12 Thread Jörg Kastning
Hi, Sorry for my late reply. You are right. Changing the quotes solved my problem. Thanks a lot, Joerg Am Freitag, 24. Juni 2016 17:41:26 UTC+2 schrieb Kai Stian Olstad: > > On 24. juni 2016 09:43, Jörg Kastning wrote: > > This is a short version from the complete string. I tr

[ansible-project] Module ping: One host fails with "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh"

2016-07-15 Thread Jörg Kastning
Hello there, before executing the following commands I started a ssh-agent bash and added my private key. Running the command "ansible all -m ping" checks succeeded but one. For one host I got the following error: host1.example.com | UNREACHABLE! => { "changed": false, "msg": "SSH Error

[ansible-project] Feature Request: Option "gid" for user module

2016-07-15 Thread Jörg Kastning
Hi, in the core module user I could specify the user id with the option "uid". The primary group instead could only be set by name. I like to have the option to specify the primary group by "gid" as well. The possibillity to specify further groups by name or gid with the option "groups" would

[ansible-project] Re: Module ping: One host fails with "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh"

2016-07-19 Thread Jörg Kastning
016 at 12:55:01 PM UTC+5, Jörg Kastning wrote: >> >> Hello there, >> >> before executing the following commands I started a ssh-agent bash and >> added my private key. >> >> Running the command "ansible all -m ping" checks succeeded but

Re: [ansible-project] Re: Module ping: One host fails with "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh"

2016-07-19 Thread Jörg Kastning
Am 19.07.2016 um 17:13 schrieb Kai Stian Olstad: > On 19. juli 2016 15:19, Jörg Kastning wrote: >> Yes, ansible use login root for SSH connection. But why should ansible >> try >> a different user? > > There are many places user configuration can be done, anyway, have

Re: [ansible-project] Re: Module ping: One host fails with "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh"

2016-07-20 Thread Jörg Kastning
> Kai Stian Olstad [19.07.2016 19:55]: > > On 19. juli 2016 18:11, Jörg Kastning wrote: > >> ESTABLISH SSH CONNECTION FOR USER: None > >> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o > >> ControlPersist=60s -o KbdInteractiveAuthentication=no -o > &

[ansible-project] Re: redhat-subscription module functionality enhancement

2016-07-25 Thread Jörg Kastning
I'd like to request a feature enhancement, too. It would be great to have an option to enable/disable a repository in redhat.repo file using the subscription-manager. The requested feature is described by this [Red Hat Article](https://access.redhat.com/solutions/265523). To enable/disable a re

[ansible-project] How to use group_by to map a role only for a specific OS

2016-07-25 Thread Jörg Kastning
Dear all, I'd like to map a role to a group of hosts with a specific operating system. So far I read Applying ‘when’ to roles and includes and the module description of group_by

[ansible-project] Re: How to use group_by to map a role only for a specific OS

2016-08-02 Thread Jörg Kastning
dvance for you help. Kind regards, Joerg Am Montag, 25. Juli 2016 13:20:08 UTC+2 schrieb Jörg Kastning: > > Dear all, > > I'd like to map a role to a group of hosts with a specific operating > system. > > So far I read Applying ‘when’ to roles and includes > <http://do

[ansible-project] Re: How to use group_by to map a role only for a specific OS

2016-08-02 Thread Jörg Kastning
:49 UTC+2 schrieb Jörg Kastning: > > Hello Kai, > > Thanks for your answer. But the method you mentioned don't work for me. I > created the following plays: > > --- > - hosts: all > - name: group by OS > group_by: key=os_{{ [ansible_distribution] }} > chan

[ansible-project] How to easily configure DNS and NTP settings on my clients?

2016-08-03 Thread Jörg Kastning
Hello, I'm still new to ansible and have a lot of questions on my mind. Maybe someone could answer two of them. In my environment I have a lot of Red Hat and some SUSE servers. I'd like to use ansible to configure the settings for DNS and NTP on these hosts. To get the most out of a tool like

[ansible-project] Feature Request for the package module yum

2016-08-10 Thread Jörg Kastning
Good morning, I'd like to request a feature for the core module yum. I would like to specify advisory which should be installed. This would be the functionallity of --advisory=RHSA-: from the local tool. Kind regards, Joerg -- You received this message because you are subscribed to th

[ansible-project] How to enhance the --check mode

2018-01-17 Thread Jörg Kastning
Hello all, we use ansible playbooks to deploy an ininital config for e.g. postfix, chrony and sshd_config to new hosts. After the deployment these systems are under the control of the associated SysAdmin. We would like to use ansible to audit the nodes to check if the intitial config was change

Re: [ansible-project] How to enhance the --check mode

2018-01-17 Thread Jörg Kastning
Am 17.01.2018 4:20 nachm. schrieb "Kai Stian Olstad" < ansible-project+l...@olstad.com>: $ ansible-playbook --help | grep diff -D, --diffwhen changing (small) files and templates, show the differences in those files; works great with --check Wow. Obviously

Re: [ansible-project] Managing /etc/resolv.conf with Ansible

2018-02-18 Thread Jörg Kastning
Am Dienstag, 28. März 2017 07:47:50 UTC+2 schrieb Jörg Kastning: > > Hi, > > I would like to thank you for your hint. We are going to set the option > "dns=none" in NetworkManager.conf with the ansible 'lineinfile' module and > then deploy the /etc/resolv.c

[ansible-project] ansible adhoc command did not return

2018-05-02 Thread Jörg Kastning
Hello folks, This morning I run the following ansible adhoc command to update some of my hosts using ansible 2.5.2: ansible host1,host2,host3 -m yum -a "name='*' state='latest'" host2 | SUCCESS => { "changed": false, "msg": "", "rc": 0, "results": [ "Nothing to do here

[ansible-project] Setting dns_servers on linux guest using vmware_guest module

2018-08-28 Thread Jörg Kastning
Hi, I read in vmware_guest documentation that Linux based OSes requires Perl package to be installed for OS customizations. Do I have to install the perl package on the guest or on my ansible contro

[ansible-project] Ansible tries to connect to host that is not in inventory

2018-09-14 Thread Jörg Kastning
Hi, running the following ad-hoc command using a static inventory file results in one strange event: # ansible --version ansible 2.6.3 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u '/usr/share/ansible/plugins/modules'] ansible

Re: [ansible-project] Ansible tries to connect to host that is not in inventory

2018-09-14 Thread Jörg Kastning
Am Freitag, 14. September 2018 14:30:19 UTC+2 schrieb Kai Stian Olstad: > > Are you sure you are checking the correct inventory? > This will give you the information Ansible uses > > ansible-config dump | grep HOST_LIST > Yes, I'm pretty sure. # ansible-config dump | grep HOST_LIST DEFAULT_HOS

Re: [ansible-project] Ansible tries to connect to host that is not in inventory

2018-09-14 Thread Jörg Kastning
Am 14.09.2018 um 17:40 schrieb Brian Coca: > Ansible does not make up hosts, so that must be defined somewhere, you > can run `ansible-inventory --list -p /path/to/playbook` to ensure no > other files add that (i.e ansible_ssh_host: foo.example.com) Yes, you are right. And thanks to your advise u

Re: [ansible-project] Re: Issue with vmware_guest_snapshot module

2017-05-31 Thread Jörg Kastning
Hi, In your playbook you specify: name: "{{ ansible_hostname }}" uuid: "{{ ansible_product_uuid | lower }}" Am Donnerstag, 18. Mai 2017 21:50:48 UTC+2 schrieb ameri...@optonline.net: > > Hi all here is the solution to this issue I really hope this helps the > next poor person

Re: [ansible-project] Re: Issue with vmware_guest_snapshot module

2017-05-31 Thread Jörg Kastning
Hi, In your playbook you have specified: name: "{{ ansible_hostname }}" uuid: "{{ ansible_product_uuid | lower }}" Did that mean, that you take a snapshot from all of your VMs in the specified folder? Regards, Joerg Am Donnerstag, 18. Mai 2017 21:50:48 UTC+2 schrieb ameri...@op

[ansible-project] Request for enhancement of the documentation for ansible module vmware_guest_snapshot

2017-05-31 Thread Jörg Kastning
Hi Folks, I would like to request an enhancement of the module documentation for the vmware_guest_snapshot module . >From the GitHub issue 22644 and this thread

Re: [ansible-project] Request for enhancement of the documentation for ansible module vmware_guest_snapshot

2017-06-01 Thread Jörg Kastning
/lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py > > On Wed, May 31, 2017 at 8:47 AM, Jörg Kastning > wrote: > >> Hi Folks, >> >> I would like to request an enhancement of the module documentation for >> the vmware_guest_snapshot module >> <

[ansible-project] Re: Free version of Ansible

2017-06-01 Thread Jörg Kastning
Hello Carlos, As Brian said, Ansible is Open Source software and you can get it for free. You can install it from the package sources of your distribution. For Red Hat and CentOS you could found it in EPEL for example. Take a look at Getting Ansible

[ansible-project] HowTo run tasks only after a snapshot was successfully taken?

2017-11-09 Thread Jörg Kastning
Hi @all, let me explain my scenario first, before I come to my question. We run most of our linux servers as virtual machines in VMware vSphere Clusters. I would like to use a playbook that takes a snapshot from a vm befor it runs further tasks on the target node. In case of a broken system af

Re: [ansible-project] HowTo run tasks only after a snapshot was successfully taken?

2017-11-12 Thread Jörg Kastning
Am 12.11.2017 um 15:23 schrieb Kai Stian Olstad: >> Here is a not working example playbook: >> --- >> - hosts: localhost >> connection: local > > Instead of using hosts: localhost, you could use the inventory hostname or > the group. > Since you have connection: local it will run on the control

Re: [ansible-project] Setting dns_servers on linux guest using vmware_guest module

2019-01-22 Thread Jörg Kastning
create. So if you have a template > you can clone then make sure it has perl. > > On Tue, Aug 28, 2018 at 5:38 AM Jörg Kastning > wrote: > >> Hi, >> >> I read in vmware_guest documentation >> <https://docs.ansible.com/ansible/latest/modules/vmware_guest

Re: [ansible-project] Re: Issue with vmware_guest_snapshot module

2019-02-02 Thread Jörg Kastning
Hello Richard, although this thread is somewhat old I hope you are still reading here and have some advise for me, because I'm going to accomplish the same task. I'll have some virtual machines in my vSphere environment which I like to: 1. Take a snapshot and if successful 2. Run task that

[ansible-project] How to get and parse the output from target hosts

2016-09-14 Thread Jörg Kastning
Hello, I would like to write a playbook to install Red Hat Security Advisory on my hosts. The idea is to put the published information about the advisories with their Numbers (e.g. RHSA-2016:1234) in a variable and run the following playbook on all hosts: --- - hosts: all tasks: - name:

[ansible-project] Re: How to get and parse the output from target hosts

2016-09-15 Thread Jörg Kastning
eboot NOW when: '"Completed!" in "{{ yumlog.stdout_lines[-1] }}"' With "{{ yumlog.stdout_lines[-1] }}" I got the last item from the list and do not have to think about the case when it occures somewhere else in the output. Greetz Joerg Am Mittwoch, 1

[ansible-project] AES strength of vault encrypt?

2016-10-07 Thread Jörg Kastning
Hello, in the documentation to Vault is written that AES is used to encrypt the files. Do someone know the key strenght? Is it aes-128 bits, aes-256 bits or maybe aes-512 bits? Thanks in advance for your reply. Re

Re: [ansible-project] AES strength of vault encrypt?

2016-10-07 Thread Jörg Kastning
Thanks for the quick reply. Jörg > Am 07.10.2016 um 14:16 schrieb Kai Stian Olstad : > >> On 07.10.2016 13:38, Jörg Kastning wrote: >> in the documentation to Vault >> <http://docs.ansible.com/ansible/playbooks_vault.html#creating-encrypted-files> >> is wri

[ansible-project] Re: vsphere_guest: is post-clone configuration on the roadmap?

2016-10-07 Thread Jörg Kastning
Hello, today I ran into the same questions as Daniel mentioned in his mail from December 11th 2015, already. Could someone provide advise on how to change hardware parameters and network after deploying a VM from a template? Regards, Joerg Am Freitag, 11. Dezember 2015 15:10:06 UTC+1 schrieb

[ansible-project] Getting template error while templating string: unexpected char while running a playbook with a role

2016-10-11 Thread Jörg Kastning
Good morning, I'm getting the following Error when running my playbook: TASK [patch_rhel : Install Red Hat Security Advisory (RHSA)] *** fatal: [rhel-t0.hrz.uni-bielefeld.de]: FAILED! => {"failed": true, "msg": "{{ 2016_1_Set }}: template error while templating string: unexpected

Re: [ansible-project] Getting template error while templating string: unexpected char while running a playbook with a role

2016-10-12 Thread Jörg Kastning
Oh Boy, I'm such a fool. Variable names must not begin with a digit. Instead they need to begin with a character. After this mistake was fixed my playbook runs as expected. Mit freundlichen Grüßen Jörg Kastning Sent from my iPhone Am 11.10.2016 um 09:24 schrieb "Jörg Kastning"

[ansible-project] vmware_guest: "unsupported parameter for module: datacenter"

2016-10-25 Thread Jörg Kastning
Hello folks, I'm having difficulties using the vmware_guest module to create a guest vm on my VMware vCenter 6. My playbook looks as follows: # Create a new VM on an ESX server - hosts: localhost tasks: - vsphere_guest: hostname: username: 'domain\user' password: "password

Re: [ansible-project] vmware_guest: "unsupported parameter for module: datacenter"

2016-10-25 Thread Jörg Kastning
Am Dienstag, 25. Oktober 2016 11:23:32 UTC+2 schrieb Kai Stian Olstad: > > On 25.10.2016 11:09, Jörg Kastning wrote: > > - hosts: localhost > > tasks: > > - vsphere_guest: > > [ snip ] > > vsphere_guest != vmware_guest > > vsphere_guest doesn’t h

[ansible-project] Some questions about the new module vmware_guest

2016-10-25 Thread Jörg Kastning
Hello, I would like to ask some queststions about the new module vmware_guest which will be included in release 2.2. In the given example the parameter hardware is used to specify osid and scsi method. What are possible values for thes

[ansible-project] How to use variables defined in a group_vars directory of a role?

2017-02-20 Thread Jörg Kastning
Hello, I would like to copy some files specified by a group_var. But while running my playbook I got the fatal error that the variable given is undefined. But first things first. My directory structure looks like: roles/mgmt/ |-- files | |-- foo | `-- bar |-- group_vars | `-- mgmt |-- hand

Re: [ansible-project] How to use variables defined in a group_vars directory of a role?

2017-02-20 Thread Jörg Kastning
Yes, you are absolutly right. What a stupid mistake. Thanks. Am 20.02.2017 5:47 nachm. schrieb "Brian Coca" : > group/host vars directories need to be adjacent to play or inventory, > they are not supported inside roles. > > > -- > Brian Coca > > -- > You received this message because yo

Re: [ansible-project] How to use variables defined in a group_vars directory of a role?

2017-02-20 Thread Jörg Kastning
Hi, I have an additional question. I read the docs yesterday and saw that groups_vars are not supported inside the roles directory structure. So I moved them from the role structure into the group_vars directory adjacent to my inventory file. But I stick with the error that the variable is und

[ansible-project] Re: Module ping: One host fails with "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh"

2017-03-22 Thread Jörg Kastning
ible/tmp/ansible-tmp- > 1488791696.74-88043441209635/ping > <192.168.69.104> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o > ControlPersist=60s -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o Passw

[ansible-project] Managing /etc/resolv.conf with Ansible

2017-03-22 Thread Jörg Kastning
Hello, we would like to manage the */etc/resolv.conf* on our RHEL 7 hosts with ansible. But currently the file is generated by NetworkManager. [root@rhel-t2 ~]# cat /etc/resolv.conf # Generated by NetworkManager search sub.exampelcom example.com nameserver nameserver My guess is that the

Re: [ansible-project] Managing /etc/resolv.conf with Ansible

2017-03-27 Thread Jörg Kastning
ieb Jean-Yves LENHOF: > > 22 mars 2017 11:23 "Jörg Kastning" > a > écrit: > > Hello, > > we would like to manage the */etc/resolv.conf* on our RHEL 7 hosts with > ansible. But currently the file is generated by NetworkManager. > > [root@rhel-t

[ansible-project] Does vmware_guest have an idempotency issue or do I hold it wrong?

2022-03-01 Thread Jörg Kastning
Hey folks, I'm using the vmware_guest module to clone virtual machines (VMs) from a template and customizing them. When running the same playbook with the same parameters/values again while the VMs already exist I would expect that there is nothing to do and task status would just be 'OK'. Ins

[ansible-project] Re: Does vmware_guest have an idempotency issue or do I hold it wrong?

2022-07-14 Thread Jörg Kastning
Hi there, I would like to bring this up again. Does somebody have an idea on this? Jörg Kastning schrieb am Dienstag, 1. März 2022 um 11:16:36 UTC+1: > > Hey folks, > > I'm using the vmware_guest module to clone virtual machines (VMs) from a > template and customizing th