Re: [ansible-project] Able to extract list of installed rpm using "shell" module but not with yum module

2020-01-29 Thread Stefan Hornburg (Racke)
On 1/29/20 3:05 PM, Pawan Kumar wrote: > Hi Team, > > I am able to extract the selected list of installed rpms using ansible > "shell" module ,But when I tried using "yum" > module ,it's no success .  > Your help would be appreciated . Hello Pawan, what's your yum task and the error message

Re: [ansible-project] Create module mssql_query Error port

2020-01-29 Thread Stefan Hornburg (Racke)
On 1/29/20 2:36 PM, Karther wrote: > Hello, > > I have create this module mssql_query.py in ansible in > /library/mssql_query.py : > > https://github.com/melmorabity/ansible-mssql-query/blob/master/mssql_query.py > > I have this error : > > The error was: TypeError: connect() got an

Re: [ansible-project] Powershell script from Ansible Playbook

2020-01-29 Thread Stefan Hornburg (Racke)
On 1/29/20 1:56 PM, Sai Prasha wrote: > I have .psl file i want to run that file on Ansible nodes ,So when i try to > invoke the .psl file using adhoc command :  > *ansible win1 -m win_command -a "powershell.exe -File > C:\Sample\tomeescript.ps1" , *It works fine > When i try to do the same with

Re: [ansible-project] Execut script with Ansible

2020-01-29 Thread Stefan Hornburg (Racke)
t please Community Ansible ? > > Thanks very much > > Best Regards, > > Karther > > Le mercredi 29 janvier 2020 10:06:31 UTC+1, Stefan Hornburg (Racke) a écrit : > > On 1/29/20 9:22 AM, Karther wrote: > > Hello, > > > > Yes my ta

Re: [ansible-project] letsencrypt

2020-01-29 Thread Stefan Hornburg (Racke)
On 1/28/20 10:22 PM, Mauricio Tavares wrote: > I saw there is a module[1] that you can use to create a > letsencrypt cert. How do you use it to renew said certificate? > > [1] > https://docs.ansible.com/ansible/latest/modules/acme_certificate_module.html#acme-certificate-module > You

Re: [ansible-project] Execut script with Ansible

2020-01-29 Thread Stefan Hornburg (Racke)
; > Thanks very much Community Ansible :) > > Best Regards, > > Karther > > Le mardi 28 janvier 2020 17:54:58 UTC+1, Stefan Hornburg (Racke) a écrit : > > On 1/28/20 5:13 PM, Karther wrote: > > Hello Varsha, > > > > For exemple if in my scri

Re: [ansible-project] What is the best approach to creating a inlude_vars file for my requirement

2020-01-28 Thread Stefan Hornburg (Racke)
On 1/26/20 3:11 PM, Shifa Shaikh wrote: > Dick Hi,  > > My requirement is not about configuring a webserver.  > > It is to maintain a check on a set of files. If the file changes by checksum > or permissions I wish to trigger an alert.  > > Thus, my ansible will stat the file and then compare

Re: [ansible-project] oracle_user module error expecting cx_oracle in DB server

2020-01-28 Thread Stefan Hornburg (Racke)
that you have to use [\\s\\S]* instead of the more straightforward .* as .* doesn't match newlines. Regards Racke > > On Tuesday, January 28, 2020 at 12:34:00 PM UTC-5, Stefan Hornburg (Racke) >

Re: [ansible-project] oracle_user module error expecting cx_oracle in DB server

2020-01-28 Thread Stefan Hornburg (Racke)
rds and lock a/c's  > #                 after the user is done . > > ### > */ > So where is the SQL code? Regards Racke > > On Tues

Re: [ansible-project] oracle_user module error expecting cx_oracle in DB server

2020-01-28 Thread Stefan Hornburg (Racke)
On 1/28/20 6:05 PM, Anand Solomon wrote: > Hi, > I am using oracle_sql module and running a sql script. The sql script > contains comments. The playbook fails because " > FAILED! => {"changed": false, "msg": "Something went wrong while executing > sql - ORA-00911: invalid character sql:  > > Is

Re: [ansible-project] Execut script with Ansible

2020-01-28 Thread Stefan Hornburg (Racke)
On 1/28/20 5:13 PM, Karther wrote: > Hello Varsha, > > For exemple if in my script sql "real.sql" there is commande line toto > I have this error : > > Traceback (most recent call last): >   File "./script_sql_4.py", line 19, in >     cur.execute(f.read().decode('utf-8')) >   File

Re: [ansible-project] Ansible custom plugin path change

2020-01-27 Thread Stefan Hornburg (Racke)
On 1/28/20 8:26 AM, Ansible Krazy wrote: > Right now, by default custom plugins are stored in home directory : > ~/.ansible/plugins/callback Our custom plugins are > placed in comman directory : say : /var/ansible/plugin > > We dont have comman user to login to perform production activities, so

Re: [ansible-project] Problem with Conditional variable

2020-01-23 Thread Stefan Hornburg (Racke)
On 1/23/20 3:22 PM, Yehuda Pinhas wrote: > *Hi!* > *I want to make the variable qos_policy set on conditional basis:* > * > * > *If bandwidth_mb == '50'* > *  then qos_policy == 'qos-nested-50'* > * > * > *else* > *  qos_policy == 'qos-nested-new-50'* > * > * > * > * > *My code is this (not

Re: [ansible-project] How to fix this ssh-keyscan problem in my playbook?

2020-01-22 Thread Stefan Hornburg (Racke)
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

Re: [ansible-project] Encrypted Password in Playbook

2020-01-21 Thread Stefan Hornburg (Racke)
On 1/21/20 11:01 AM, Srinivas Naram wrote: > Hello Vladimir, > > Thanks for your reply. > > I am trying to maintain password (encrypted using ansible-vault) and my > playbook (clear-text) in separate files. If I > understand correctly the below URL is suggesting to encrypt the password >

Re: [ansible-project] ansible error message

2020-01-21 Thread Stefan Hornburg (Racke)
ot_pah: /var/www/html >            letsencrypt_email: x...@.com >            letsencrypt_cert_domains: >             - ldaptest.xxx.com >             - xxx.com >            letsencrypt_renewal_command_args: '--renew-hook "systemctl restart > apache"' Use include_role or import_role. Regards

Re: [ansible-project] Ansible import playbooks with openstack error

2020-01-21 Thread Stefan Hornburg (Racke)
On 1/21/20 10:07 AM, sv wrote: > Hi Experts, > > Im very new to ansible and trying to set a small project by executing the > scripts. > My anisble --version is 2.2.1.0 > Python 2.7.12+ > and open stack version is v.3.0 > > I have a site.yaml file as below > site.yaml > - import_playbook:

Re: [ansible-project] ansible error message

2020-01-21 Thread Stefan Hornburg (Racke)
On 1/21/20 10:09 AM, Sandy Hung wrote: > Dear All: > > I don't know this error is? > can hlep me thanks. > > > ERROR! conflicting action statements: lineinfile, roles > > The error appears to be in '/home/sandy/phpldapadmin.yml': line 54, column 6, > but may > be elsewhere in the file

Re: [ansible-project] Re: openldap for ubuntu

2020-01-19 Thread Stefan Hornburg (Racke)
On 1/20/20 7:58 AM, Sandy Hung wrote: > How to define  the variable vault_secret? > thanks. Well you should know what the value of this variable is ... There are many places where you can define variables: https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html Regards

Re: [ansible-project] Re: openldap for ubuntu

2020-01-19 Thread Stefan Hornburg (Racke)
On 1/20/20 7:42 AM, Sandy Hung wrote: > sorry error message is > > fatal: [192.168.1.153]: FAILED! => {"msg": "The task includes an option with > an undefined variable. The e'vault_secret' > is undefined\n\nThe error appears to be in '/home/sandy/ldapinstall.yml': > line 23, column \nbe

Re: [ansible-project] Upgrading Ansible Tower to 3.6

2020-01-08 Thread Stefan Hornburg (Racke)
On 1/7/20 8:10 AM, Gini Gangadharan wrote: > #ansibletower #upgrade > Anyone got a proper instruction set to upgrade Ansible Tower 3.4 to 3.6 ? > (Ansible 2.5,  Database - postgres 9.6) > > thanks #redhatsupport This list is only about Ansible, nor tower neither AWX. Regards Racke >

Re: [ansible-project] String alignments

2019-12-27 Thread Stefan Hornburg (Racke)
o share your playbook / tasks and a sample for the list? Regards Racke > On Thu, 26 Dec 2019, 21:22 Stefan Hornburg (Racke), <mailto:ra...@linuxia.de>> wrote: > > On 12/26/19 10:51 AM, Gopal Chatla wrote: > > I've created a variable from stdout_lines and t

Re: [ansible-project] String alignments

2019-12-26 Thread Stefan Hornburg (Racke)
On 12/26/19 10:51 AM, Gopal Chatla wrote: > I've created a variable from stdout_lines and the contents are copied into a > file through blockinfile module along with > jinja template for loop. > > The for loop iterates 40 lines. But how do add new line after every 10 lines > in jinja template

Re: [ansible-project] Re: Cant SSH / PING to Network Devices

2019-12-21 Thread Stefan Hornburg (Racke)
On 12/22/19 5:51 AM, Nirmal Gauda wrote: > on more thing : i have logged in to ansible server as "root" but my username > to log in to network device is "admin" ... > do i have to define that somewhere ? > Use the ansible_user variable. Further information:

Re: [ansible-project] regexp is not working in window ansible

2019-12-17 Thread Stefan Hornburg (Racke)
e present. Regards Racke > > On Wed, Dec 18, 2019 at 2:45 AM Stefan Hornburg (Racke) <mailto:ra...@linuxia.de>> wrote: > > On 12/17/19 6:06 PM, Uppara venkat wrote: > > Hi all, > > > > I would like add a line in particular line, I have writt

Re: [ansible-project] regexp is not working in window ansible

2019-12-17 Thread Stefan Hornburg (Racke)
On 12/17/19 6:06 PM, Uppara venkat wrote: > Hi all, > > I would like add a line in particular line, I have written a task as below;  > > --- > - name: adding script line with package name >   win_lineinfile: >     dest: D:/Software/configurations/uCMDBProbeResponseFile.txt >     regexp:

Re: [ansible-project] Ansible playbook, trying to execute ssh-copy-id to remote host for passwd less login,

2019-12-17 Thread Stefan Hornburg (Racke)
On 12/17/19 1:10 PM, Ganeshwari Sk wrote: > Hi, > > I am new for ansible. I wrote the following playbook to execute the > ssh-copy-id to copy the id_rsa.pub key to remote > host, but I am getting permission denied error or hanging when passing > password as argument, 1. Make sure that Ansible

Re: [ansible-project] uri body call needs [] instead of {}

2019-12-14 Thread Stefan Hornburg (Racke)
On 12/14/19 12:46 AM, Nicholas Britton wrote: > The problem is I don't know how to make ansible send the right bracket. > Testing from swagger I know what it expects.  > Hello Nicholas, try to use a list instead of a dict: data: - type: storageServer id: 'PureDisk:server.domain'

Re: [ansible-project] Zeros are truncated from strings. #10281

2019-12-13 Thread Stefan Hornburg (Racke)
On 12/13/19 2:40 PM, Dylan Humphreys wrote: > Im getting that bug happen to me, but Im on 2.9.2 > > | >  %dpkg -l ansible > > Desired=Unknown/Install/Remove/Purge/Hold > > |Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend > > |/ Err?=(none)/Reinst-required

Re: [ansible-project] deploy WAR file in IBM Webshpere application server ND9 (AIX server 7.1)

2019-12-12 Thread Stefan Hornburg (Racke)
On 12/12/19 10:14 AM, Pradeep Drall wrote: > We are unable to deploy WAR file in IBM Webshpere application server ND9 (AIX > server 7.1) through ansible. >   >   >  tasks: > name: copying the war file from the existing WAS deployment folder to backup > shell: sh wsadmin.sh -username wsadmin

Re: [ansible-project] Optimization help

2019-12-11 Thread Stefan Hornburg (Racke)
On 12/11/19 6:50 PM, Rahul Kumar wrote: > > Ok it will skip and will continue to next item. Right ? Yes Regards Racke > > On Wed, 11 Dec 2019 at 11:12 PM, Stefan Hornburg (Racke) <mailto:ra...@linuxia.de>> wrote: > > On 12/11/19

Re: [ansible-project] Optimization help

2019-12-11 Thread Stefan Hornburg (Racke)
On 12/11/19 6:39 PM, Rahul Kumar wrote: > > Thanks vlado! What will happen if let’s say item2conf is not defined ? > It will skip it. Regards Racke > On Wed, 11 Dec 2019 at 9:47 PM, Vladimir Botka > wrote: > > Hi Rahul, > > On Wed, 11 Dec 2019

Re: [ansible-project] Optimization help

2019-12-11 Thread Stefan Hornburg (Racke)
On 12/11/19 3:33 PM, Rahul Kumar wrote: > Hi Ansible Gurus, > How can I optimize below code ? below is the sufficient code to understand > the problem... The code doesn't tell me anything what your objectives are and which tasks you are actually running. There is no point in optimizing code

Re: [ansible-project] Re: execute ssh-copy-id, if passwdless login not able

2019-12-11 Thread Stefan Hornburg (Racke)
On 12/11/19 11:43 AM, Ganeshwari Sk wrote: > I am newbie to ansible. I am trying to execute two different task.  > 1. checking passwdless login. executing hostname and id command in the remote > host and printing its result when succcess. > 2. executing ssh-copy-id and copying pub key to the

Re: [ansible-project] execute ssh-copy-id, if passwdless login not able

2019-12-11 Thread Stefan Hornburg (Racke)
On 12/11/19 10:21 AM, Ganeshwari Sk wrote: > in Ansible playbook, I want to do two task, one to check passwdless ssh login > is enabled or not, and in another task if > passwdless login not abled for the remote host, then execute the ssh-copy-id > command. > I have written the following

Re: [ansible-project] using assert in ansible

2019-12-10 Thread Stefan Hornburg (Racke)
On 12/10/19 4:30 PM, evnflow wrote: > I have a playbook and I am using the following assertion  > >   assert: >     that: ( (disk_usage|float)/mount.size_total ) < disk_limit|float >     msg: "Disk usage {{ disk_usage_ratio_s }} exceeds {{ disk_limit_ratio_s > }}" >   any_errors_fatal: true > >

Re: [ansible-project] Ansible - How register some line in variable

2019-12-10 Thread Stefan Hornburg (Racke)
On 12/10/19 3:20 PM, Karther wrote: > Hey Community ansible !! :) > > I have some line texte with this content : > > my first line > my second line > > my 3ème line > my 4ème line > > > I want register all this line with one variable ? i don't know if possible or > not please ??? > > Can

Re: [ansible-project] How can I get Ansible to only use Python 3.6?

2019-12-10 Thread Stefan Hornburg (Racke)
You tried a workaround instead of fixing the real problem. Such a waste of time :-) Regards Racke > > On Tue, Dec 10, 2019 at 08:06 Stefan Hornburg (Racke) <mailto:ra...@linuxia.de>> wrote: > > On 12/10/19 2:02 PM, Gyalgin Sherpa wrote: >

Re: [ansible-project] How can I get Ansible to only use Python 3.6?

2019-12-10 Thread Stefan Hornburg (Racke)
On 12/10/19 2:02 PM, Gyalgin Sherpa wrote: > That’s as usual with public key > So why doesn't the Ansible user use a public key? Regards Racke > On Tue, Dec 10, 2019 at 07:57 Stefan Hornburg (Racke) <mailto:ra...@linuxia.de>> wrote: > > On 12/10/19 11:36

Re: [ansible-project] How can I get Ansible to only use Python 3.6?

2019-12-10 Thread Stefan Hornburg (Racke)
r the assumption that you need the password for private repositories as opposed to public ones). Regards Racke > > On Tue, Dec 10, 2019 at 5:09 AM Stefan Hornburg (Racke) <mailto:ra...@linuxia.de>> wrote: > > On 12/10/19 10:57 AM, Gyalgin Sherpa wrote: > &g

Re: [ansible-project] How can I get Ansible to only use Python 3.6?

2019-12-10 Thread Stefan Hornburg (Racke)
I target same location with following line in ansible playbook, it’s > prompting me password  > > Best Regards > > On Tue, Dec 10, 2019 at 04:10 Stefan Hornburg (Racke) > mailto:ra...@linuxia.de>> wrote: > > On 12/10/19 10:0

Re: [ansible-project] How can I get Ansible to only use Python 3.6?

2019-12-10 Thread Stefan Hornburg (Racke)
Gyalgin, it is really so hard to start a fresh email instead of hijacking the subject and providing more than next to nothing information about your problem? Did you try to clone the Git repo manually on the target system as the same user as Ansible? Regards Racke > On Tue, Dec

Re: [ansible-project] How can I get Ansible to only use Python 3.6?

2019-12-10 Thread Stefan Hornburg (Racke)
On 12/9/19 10:30 PM, Mark Bolden wrote: > I am on Centos 7 and I was trying to install Pyrax and seeing these errors: > > ERROR: os-service-types 1.7.0 has requirement pbr!=2.1.0,>=2.0.0, but you'll > have pbr 1.10.0 which is incompatible. > ERROR: python-keystoneclient 3.22.0 has requirement

Re: [ansible-project] Using ignore_errors : yes in loop

2019-12-10 Thread Stefan Hornburg (Racke)
On 12/10/19 8:56 AM, Rahul Kumar wrote: > Hi Dick and Ansible gurus, > I want to continue to other items of loop even if any of the item is failed > in loop(probably we did not define that item > and because of that - item failed, in that case it should continue to > remaining items). How can we

Re: [ansible-project] Need help for ansible Junos module

2019-12-07 Thread Stefan Hornburg (Racke)
On 12/7/19 2:21 PM, Hitesh Kumar wrote: > Need Help : Getting error while running ansible playbook for Junos rpc > > atal: [vSRX-1]: FAILED! => {"ansible_facts": > {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, > "msg": "Unsupported parameters for (junos_rpc) module:

Re: [ansible-project] Montior bgp session for juniper routers

2019-12-06 Thread Stefan Hornburg (Racke)
On 12/6/19 10:08 AM, Hitesh Kumar wrote: > Hi  > I am looking for play book to monitor bgp sessions. > 1.log rpc output in json format. > 2run continously ansible playbook for 24*7 aftet an interval for 15 minutes. > > Regards > Hitesh Hello Hitesh, why don't you use a regular monitoring

Re: [ansible-project] Variable in Ansible Role

2019-12-05 Thread Stefan Hornburg (Racke)
On 12/6/19 8:48 AM, Rahul Rawat wrote: > Hi, > > I have to parse variable in static PowerShell script which will copy through > win_copy module on target machine. > Means when file copy on target machine after running playbook it should have > values of those variable. > > I've keep variable

Re: [ansible-project] How to bypass a Linux server FID

2019-12-05 Thread Stefan Hornburg (Racke)
On 12/5/19 3:55 PM, Deepanjan Acharya wrote: > I am stuck here in a case , i have couple of clustered App servers running > Weblogic on top of them.Servers are Linux > RHEL 7 and needs us to run "be fid" to access application locations i,e a > functional id.  > I am not able to bypass the same

Re: [ansible-project] Re: Testing Authentication with Ansible

2019-12-05 Thread Stefan Hornburg (Racke)
On 12/5/19 3:20 PM, Adam wrote: > We've been experimenting using Selenium for things like this.  It's not > simple and will probably make your head hurt (it > makes mine hurt), but it is very flexible for things like this. There are numerous crawlers around that can be used for that task if you

Re: [ansible-project] Fwd: Ansible Tower installation problem - package not found

2019-12-05 Thread Stefan Hornburg (Racke)
On 12/5/19 11:04 AM, Davide Scrimieri wrote: > > > > > Hello,  > I am writing as I have found no other solution online. > > I am trying to install a tower-setup-bundle (version 3.5.1) as the > installation process must happen offline. Hello Davide, please contact RedHat support. This list

Re: [ansible-project] Task Output import to SQL

2019-12-05 Thread Stefan Hornburg (Racke)
On 12/4/19 11:00 PM, Ansible_USer2019 wrote: > Hi Group, > > i want to run several jobs. How can the JSON result stored in a database or > something like that to check what happened?  > I am not using tower or awx.  > > So do i need to pipe the output into a text file and run another script to

Re: [ansible-project] Ansible Tower and Akamai API

2019-12-04 Thread Stefan Hornburg (Racke)
On 12/4/19 4:16 PM, Garry Taylor wrote: > Hello, > We have been using Ansible Tower to purge website objects in Akamai cache > (Akamai is a CDN) for several years, using an > Akamai API > Akamai no longer provide the API version 2, and have forced customers to use > a new API version 3. > There

Re: [ansible-project] Install packages from a file where list all of packages that need to install to remote server.

2019-11-29 Thread Stefan Hornburg (Racke)
On 11/30/19 7:39 AM, Dick Visser wrote: > Also if you have that many packages and the length of the list is an issue, > you could consider leaving out the packages > that are dependencies of other packages. > I think it would be more efficient to pass all package names to apt instead of

Re: [ansible-project] The error was: 'inventory_dir' is undefined

2019-11-29 Thread Stefan Hornburg (Racke)
On 11/29/19 9:37 AM, zhengqis...@sohu.com wrote: > > ansible version: 2.7.4 > systemos : centos7 > > playbook: > - name: local init > hosts: localhost > tasks: > - name: test > debug: msg="{{ host_yum_repos_file_path }}" > > > inventory file: > [master] > 192.168.0.1 > > [all:vars] >

Re: [ansible-project] Ansible Version Migration

2019-11-27 Thread Stefan Hornburg (Racke)
On 11/27/19 10:47 AM, deva raju wrote: > Hi Stefan, > > > FYI >>> > > vars.yml > > apache_log_format: '\[%{%d\/%b\/%Y:%H:%M:%S}t\.%{msec_frac}t %{%z}t\]  %a  %h  > \\"%r\\"  ' > > - name: Standardize access log format >   shell:  >          sed -i '/LogFormat/c LogFormat "rev_proxy@{{

Re: [ansible-project] Ansible Version Migration

2019-11-27 Thread Stefan Hornburg (Racke)
On 11/27/19 10:05 AM, deva raju wrote: > Thanks Alicia for letting us know about maintained versions. > > But, While i'm upgrading my scripts from 1.5.3/2.1.1 to 2.9 , Some of the > expressions were not getting evaluated > successfully. > > I found that  "%{%d:%Y:%H:%m:%S}t" is not getting

Re: [ansible-project] Re: Need help to run my first ansible playbook

2019-11-27 Thread Stefan Hornburg (Racke)
On 11/27/19 5:29 AM, 'Richard' via Ansible Project wrote: > Thanks for your help Michael. > The playbook is working now but ran into a another error > > PLAY [Run Show Command] > > > TASK [run show command] >

Re: [ansible-project] import_playbook for a different host

2019-11-27 Thread Stefan Hornburg (Racke)
On 11/27/19 4:14 AM, Michael wrote: > Let's say i have host groups defined in my inventory file as follows: > > [group1] > serverA > > [group2] > serverB > > > and i have a playbook called existing.yml that has hosts variable defined for > host in group1: > > --- >  - hosts: group1 >   

Re: [ansible-project] How to convert o/p of ansible playbook to a proper readable format

2019-11-26 Thread Stefan Hornburg (Racke)
s meter when called from Ansible. Regards Racke > > On Tue, Nov 26, 2019 at 1:03 PM Stefan Hornburg (Racke) <mailto:ra...@linuxia.de>> wrote: > > On 11/26/19 8:25 AM, Rakesh Parida wrote: > > Hi Racke, > > Thanks for your suggestion > >

Re: [ansible-project] Need help in upgrading application using ansible in windows operating system

2019-11-25 Thread Stefan Hornburg (Racke)
On 11/26/19 6:46 AM, Shashidhar Reddy wrote: > please help :) > Sorry, but I don't think we are supposed to do your job for you. Start with a sample application installation and go from where. If you can show the playbook and its outcomes your chances are way higher to get help here ( not

Re: [ansible-project] How to convert o/p of ansible playbook to a proper readable format

2019-11-25 Thread Stefan Hornburg (Racke)
                                     ]         >                                           >                                              

Re: [ansible-project] How to convert o/p of ansible playbook to a proper readable format

2019-11-25 Thread Stefan Hornburg (Racke)
On 11/26/19 7:50 AM, Rakesh Parida wrote: > Hi , > > I have a role  for deleting VM using PWSH script via ansible : > --- > - name: Run PowerShellGet VM script >   delegate_to: localhost >   shell: pwsh /home/raka/delete-snapshot{{item}}.ps1 >   ignore_errors: yes >   changed_when: false >  

Re: [ansible-project] Need to filter with_items values based on specific string

2019-11-25 Thread Stefan Hornburg (Racke)
On 11/25/19 2:42 PM, Pandu jh wrote: > > I need to reject "none" value item in ping test task. It has to take only > "non- none" values from the with_items in the > task. >  Please help me to fix this. > >       - set_fact: >           linux_ip: "{{ item.stdout_lines[0] }}" >           unix_ip:

Re: [ansible-project] AWX Tower install failure (2 separate servers)

2019-11-21 Thread Stefan Hornburg (Racke)
On 11/21/19 3:48 PM, John James wrote: > Good Morning, > >    I am pretty new to Ansible, I had built an AWX Tower some months ago, but > had to let it sit.  Last week I started > working on it again when that instance got stuck in an upgrade loop.  I spent > a few days trying to reinstall and

Re: [ansible-project] How to convert json to csv

2019-11-20 Thread Stefan Hornburg (Racke)
he resulting JSON look like? I think it would be easier to convert the "interfaces_status_facts" straight away to CSV. Regards Racke > > > > > On Wednesday, November 20, 2019 at 4:40:51 PM UTC+5:30, Stefan Hornburg > (Racke) wrote: > > On 11/20/19 1

Re: [ansible-project] Ansible find module not accepting fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (find) module: become Supported parameters include: age, ag

2019-11-20 Thread Stefan Hornburg (Racke)
On 11/20/19 2:25 PM, Nasir Nasir wrote: > I want to access a directory  as sudo user of Linux when i gave  > > Below is the code for the same which i tried; > >      - name: Ansible delete files older than 1  minutes  example >        find: >          paths: '{{diskclrpath}}' >          age:

Re: [ansible-project] How to convert json to csv

2019-11-20 Thread Stefan Hornburg (Racke)
On 11/20/19 11:30 AM, rajthecomputerguy wrote: > Hi Team, > > Anybody knows how to convert json to csv in ansible? > > Thanks, > Pushparaj > What's your use case? I suppose you know you can't convert JSON with a nested structure to CSV? Regards Racke > -- > You received this

Re: [ansible-project] Probleme ansible with build Jenkins

2019-11-18 Thread Stefan Hornburg (Racke)
On 11/18/19 11:50 AM, Karther wrote: > Hey, > > I know it's a little bit gold but i have maven with component war with this > file pom : > > http://maven.apache.org/xsd/maven-4.0.0.xsd;> > 4.0.0 > workflow > Portal > ${version-prod} > war > Portal > > > And on my file

Re: [ansible-project] Could not find or access template file

2019-11-11 Thread Stefan Hornburg (Racke)
On 11/11/19 12:48 PM, morten hoffmann wrote: > hi > > I'm trying to setup a linux service on remote host > > I have my file in template folder > . > ├── group_vars > │   ├── artefacts_conf.yml > │   ├── jdk_wl_conf.yml > │   ├── configuration_conf.yml > ├── hosts > └── templates >     ├──

Re: [ansible-project] Docker+ansible

2019-11-02 Thread Stefan Hornburg (Racke)
compose file >       file: >        src: /root/DockerComposeFile >        dest: /root/DockerComposeFile >        mode: "0755" > >      - name: Run a docker compose file >        docker_service: >          project_src: "{{ compose_dir }}" >          sta

Re: [ansible-project] Docker+ansible

2019-11-02 Thread Stefan Hornburg (Racke)
On 11/2/19 1:28 PM, Sunitha Iyer wrote: > Hi Felix > > Thanks, I am struggling to find the syntax Hello Sunitha, search for "Ansible docker compose", this should provide enough examples to build upon. For specific help, post your playbook and the output and explain why you did it that way.

Re: [ansible-project] playbook hangs during shell commanf execution

2019-10-30 Thread Stefan Hornburg (Racke)
On 10/30/19 12:40 PM, Anup Kumar wrote: > Hi Team, > > Need help.. while executing the PB using awx it hangs during shell execution. > PB is for San zone creation. > > Thanks > Hello Anup, this list is for Ansible only, not for AWX or Tower. Also please get used to post sufficient

Re: [ansible-project] Best practice to test a playbook on a Docker image

2019-10-21 Thread Stefan Hornburg (Racke)
king with Red Hat Linux (RHEL) in a Vagrant Box" or just take a Vagrant box from their website. Disclaimer: I use only CentOS boxes, but it shouldn't be that much different. Regards Racke > > Le lundi 21 octobre 2019 17:29:16 UTC+2, Stefan Hornburg (Racke) a écrit : &g

Re: [ansible-project] Best practice to test a playbook on a Docker image

2019-10-21 Thread Stefan Hornburg (Racke)
On 10/21/19 6:20 PM, Julien Cochennec wrote: > Hi, Ansible Noob here. > > We're developing ansible roles and playbooks for production VMs which are > RHEL7 systems. > We can't test our playbook on those machines because they are dedicated to > another service. > So we only can test playbooks on

Re: [ansible-project] ansible +docker

2019-10-17 Thread Stefan Hornburg (Racke)
tVM >   tasks: >      - name: build docker image >        docker_image: >            name: xyz >            path: /var/dockertest > > > On Thursday, October 17, 2019 at 12:44:29 PM UTC+1, Stefan Hornburg (Racke) > wrote: > > On 10/17/19 11:45 AM, Sunitha Iyer wro

Re: [ansible-project] ansible +docker

2019-10-17 Thread Stefan Hornburg (Racke)
> /usr/lib/python2.7/site-packages (from > requests!=2.18.0,>=2.14.2->docker) (1.25.6) > Requirement already satisfied: certifi>=2017.4.17 in > /usr/lib/python2.7/site-packages (from > requests!=2.18.0,>=2.14.2->docker) (2019.9.11) > Installing collected package

Re: [ansible-project] ansible +docker

2019-10-16 Thread Stefan Hornburg (Racke)
On 10/16/19 8:07 PM, Sunitha Iyer wrote: > I am trying to run a play book from host(ansible VM) to pull an image from > docker host, I tried pip install docker still > it not working, can you please help. > > > failed to import the required python library (docker sdk for python: docker >

Re: [ansible-project] Variable value saving into one column of csv file

2019-10-16 Thread Stefan Hornburg (Racke)
On 10/16/19 11:27 AM, abhay srivastava wrote: > > Hi, > > I want to save 1st variable value coming from loop into 1st column  and 2nd > variable value coming from loop into 2nd > column and so on. > > - local_action: lineinfile line="{{ > result.results[item|int].container.Config.Hostname }}"

Re: [ansible-project] conditional statement and if it is true , it should accept yes and continue for next step if not then it should terminate

2019-10-14 Thread Stefan Hornburg (Racke)
On 10/14/19 11:47 AM, Manish Kumar wrote: > Hi All, > > I am trying to implement an conditional statement and if it is true , it > should accept yes and continue for next step if > not then it should terminate .  Below playbook is not reading vaue like what > we do in shell script with Echo

Re: [ansible-project] /bin/bash output in ansible playbook as a conditional statement

2019-10-11 Thread Stefan Hornburg (Racke)
On 10/11/19 7:58 AM, Manish Kumar wrote: > > Dear All, > > Is it possible to get the output from .sh file and compare with "Apache > Tomcat/9.0.26" and if condition is true proceed > for next step ? > The condition in "when" is evaluated before running the task. You need an additional task

Re: [ansible-project] pip docker install

2019-10-04 Thread Stefan Hornburg (Racke)
On 10/3/19 7:42 PM, Alfredo De Luca wrote: > still doesn't work. everything I do the first time doesn't work and the > second time it does > > very very weird... Can you provide OS and release information about the target? Regards Racke > > > On Thu, Oct 3, 2019 at 7:52 AM P.

Re: [ansible-project] Ansible variables for multiple inventories

2019-09-27 Thread Stefan Hornburg (Racke)
On 9/27/19 12:38 PM, J F wrote: > Hello. > I have following host file: > | > [main:children] > group_1 > group_2 > [group_1:vars] > testvar='testval1' > [group_2:vars] > testvar='testval2' > | > > Running playbook below I am getting value 'testval1' > |group_2| > > Could, please, someone explain

Re: [ansible-project] Failed to install ansible tower on CentOS 7

2019-09-27 Thread Stefan Hornburg (Racke)
On 9/27/19 2:53 AM, Sunil wrote: > I'm new to Ansible. > > I am failed to install ansible tower due to awx-manage migrate.  Can some one > review and help me? > > ansible 2.8.4 > python  2.7.5 > ansible tower - 3.4.2.-1 ( i tired 3.4 version also, got same issue on that) Hello Sunil, this

Re: [ansible-project] SLES 15 SP1 SAet to Permissive Mode

2019-09-26 Thread Stefan Hornburg (Racke)
On 9/26/19 2:28 PM, Keith Mills wrote: > Why doesn't this have anything to do with Ansible? I'm trying to do this with > Ansible! I'm asking if there's a way to do > it within Ansible! How would I set up the Ansible task? Well if you can come up with a shell command that does what you want, we

Re: [ansible-project] Assign and print variable inside a with_items loop based on condition.

2019-09-25 Thread Stefan Hornburg (Racke)
367595418\n-rw-rw-r-- user2 2019-09-13 15:36 /fin/mrt/testingmrt.mrt > 1251350031\n-rw-rw-r-- user2 2019-09-13 15:37 > /fin/exe/testingexe.exe 1390265645\n-rw-rw-r-- user2 2019-09-13 15:38 > /fin/com/testingcom.com 90193476        > /fin/scripts\n/fin/mrt\n/fin/exe\n/fin

Re: [ansible-project] Assign and print variable inside a with_items loop based on condition.

2019-09-25 Thread Stefan Hornburg (Racke)
g": "Hello world!" >> } >> >>   >> >> TASK [debug] >> >> ******** >>

Re: [ansible-project] Assign and print variable inside a with_items loop based on condition.

2019-09-25 Thread Stefan Hornburg (Racke)
Racke > You can recreate the playbook output. > > On Wednesday, September 25, 2019 at 2:23:22 PM UTC+5:30, Stefan Hornburg > (Racke) wrote: > > On 9/25/19 10:44 AM, Mohtashim S wrote: > > @Stefan here is the output > > > > Sorry but there is no &quo

Re: [ansible-project] Assign and print variable inside a with_items loop based on condition.

2019-09-25 Thread Stefan Hornburg (Racke)
595418\n-rw-rw-r-- user2 2019-09-13 15:36 /fin/mrt/testingmrt.mrt > 1251350031\n-rw-rw-r-- user2 2019-09-13 15:37 > /fin/exe/testingexe.exe 1390265645\n-rw-rw-r-- user2 2019-09-13 15:38 > /fin/com/testingcom.com 90193476        > /fin/scripts\n/fin/mrt\n/fin/exe\n/fin/com   

Re: [ansible-project] Assign and print variable inside a with_items loop based on condition.

2019-09-25 Thread Stefan Hornburg (Racke)
On 9/25/19 9:58 AM, Mohtashim S wrote: > |   - debug: >        msg: "User was {{ item.split('\t')[3] }}" >      with_items: "{{ command_result.stdout_lines }}"| > > > The above give me the below output: > > "msg": "User was FrontEnd" > "msg": "User was BackEnd" > > > I now wish to set

Re: [ansible-project] How to trigger Ansible Play in a loop

2019-09-23 Thread Stefan Hornburg (Racke)
On 9/23/19 2:50 PM, Mohtashim S wrote: > command_result variable get database record while could be multi-line. > > The below helps me loop over each record of the database. > > | >    -debug: >        msg:"This is a database line: {{ item }}" >      with_items:"{{ command_result.stdout_lines

Re: [ansible-project] Ansible when condition check fails and does not behave as expected,

2019-09-23 Thread Stefan Hornburg (Racke)
On 9/23/19 12:22 PM, Mohtashim S wrote: > I'm expecting set_facts not to assign values to variables when the SQL query > does not yeild any results. > >  when condition  command_result.stdout == "" is meant for the same.  > > Below is my playbook. > > Hello Mohtashim, you need to use "when"

Re: [ansible-project] Pip install docker

2019-09-21 Thread Stefan Hornburg (Racke)
uld explain your problem with the first install. Regards Racke > > On Sat, Sep 21, 2019 at 1:15 PM Stefan Hornburg (Racke) <mailto:ra...@linuxia.de>> wrote: > > On 9/21/19 1:11 PM, Alfredo De Luca wrote: > > Hi all.  > > I installed python pip with an

Re: [ansible-project] Pip install docker

2019-09-21 Thread Stefan Hornburg (Racke)
On 9/21/19 1:11 PM, Alfredo De Luca wrote: > Hi all.  > I installed python pip with ansible then, in the same playbook, I use pip to > install docker-py libs but it keep saying  > *"Unable to find any of pip3 to use.  pip needs to be installed." > * > Then If I run the same playbook or if I

Re: [ansible-project] Ansible in virtualenv mixing python with os

2019-09-20 Thread Stefan Hornburg (Racke)
On 9/20/19 4:28 PM, Mr Decisive wrote: > Hi Stefan, > > Thanks for the info.  > > I'd tried putting  > > ansible_python_interpreter: /home//py3/bin/python > > in the ansible.cfg file in /etc/ansible/ but whilst it read the file as I > could tell from the -vvv switch I was still > seeing parts

Re: [ansible-project] Ansible register multiple variables within a single task

2019-09-17 Thread Stefan Hornburg (Racke)
policy: targeted debian: policy: default And in the task: policy: "{{ selinux_details[ansible_distribution|lower] }}" Disclaimer: not tested Regards Racke > > > > On Monday, September 16, 2019 at 8:31:16 AM UTC-5, Stefan Hornburg (Racke) > wrote: >

Re: [ansible-project] Firewalld fails to start on SLES 15 SP1

2019-09-16 Thread Stefan Hornburg (Racke)
On 9/16/19 8:28 PM, Keith Mills wrote: > Dear Readers, > > Firewalld fails to start for SLES 15 SP1.  > > | That's a pity, but how is this related to Ansible? Regards Racke > # systemctl status firewalld > ●firewalld.service -firewalld -dynamicfirewall daemon >    Loaded:loaded

Re: [ansible-project] Ansible register multiple variables within a single task

2019-09-16 Thread Stefan Hornburg (Racke)
On 9/16/19 3:23 PM, Keith Mills wrote: > Hello All, > > I have an Ansible task and I want to register multiple variables inside it, > how do I achieve this? It doesn't seem that > a list or a comma separated string would work. > > This is what I have: > > | > -name:SetSELinuxto permissive mode

Re: [ansible-project] Ansible Azure - azure_rm_image

2019-09-16 Thread Stefan Hornburg (Racke)
On 9/16/19 3:05 PM, Lucas Chies wrote: > Hello team, > I'm trying to use Ansible to create snapshot from my azure VMS. > But every time that I use the azure_rm_image, return error. > > ERROR! 'azure_rm_image' is not a valid attribute for a Play > > Someone already use this? > > Tks Please post

Re: [ansible-project] Ansible AWX/Tower configure with MS AD auth

2019-09-16 Thread Stefan Hornburg (Racke)
On 9/16/19 1:27 PM, Andrew Meyer wrote: > I have an instance of AWX setup and I am trying to configure it with MS > Windows AD authentication.  I am using the > docker setup of AWX.  1) Where should I be looking for logs to help diagnose > config issues?  2) Does anyone have an > example of how

Re: [ansible-project] Ansible installation of MongoDB - missing mongodb folder in /var/run

2019-09-16 Thread Stefan Hornburg (Racke)
On 9/16/19 9:59 AM, Stephen Thorpe wrote: > Hi, > > I'm deploying MongoDB to a number of servers using the script below.  Servers > are Ubuntu 18.0.4.   I have an issue where > the installation fails to create a mongo folder in /var/run/ and thus can't > start the service (No place to put the

<    2   3   4   5   6   7   8   >