Re: [ansible-project] custom facts - "msg": "[Errno 8] Exec format error: b'/etc/ansible/facts.d/custom.fact'", "rc": 8}},

2020-04-01 Thread Stefan Hornburg (Racke)
On 4/2/20 4:16 AM, Rajesh wrote: > Hi All, > > I created a custom facts playbook. But I am getting an error when I run. I > could not figure out why? Hello Rajesh, if /etc/ansible/facts.d/custom.fact is supposed to be a script it needs executable permissions: - name: Create a custom facts

[ansible-project] Optimize Powershell in playbook

2020-04-01 Thread UnknownGnome
Hello, I'm trying to get a playbook working that will run the Optimize Powershell script that is here: https://docs.ansible.com/ansible/latest/user_guide/windows_performance.html The playbook succeeds, but when I check for one of the installed assemblies on a host, it shows as not installed.

[ansible-project] custom facts - "msg": "[Errno 8] Exec format error: b'/etc/ansible/facts.d/custom.fact'", "rc": 8}},

2020-04-01 Thread Rajesh
Hi All, I created a custom facts playbook. But I am getting an error when I run. I could not figure out why? *Playbook* - name: Create a custom facts file hosts: database become: true become_user: root gather_facts: true tasks: - name: Create a custom facts directory file:

Re: [ansible-project] Location of aws_ssm module

2020-04-01 Thread Gurtaj Atwell
Awesome, thank you! On Wednesday, April 1, 2020 at 3:51:30 PM UTC-7, Matt Martz wrote: > > Oops, my apologies, I thought you were asking for the connection plugin. > The lookup plugin is located over at: > > https://github.com/ansible-collections/amazon.aws > > On Wed, Apr 1, 2020 at 5:41 PM

Re: [ansible-project] Location of aws_ssm module

2020-04-01 Thread Matt Martz
Oops, my apologies, I thought you were asking for the connection plugin. The lookup plugin is located over at: https://github.com/ansible-collections/amazon.aws On Wed, Apr 1, 2020 at 5:41 PM Matt Martz wrote: > As of March 23 it was moved to > >

Re: [ansible-project] Location of aws_ssm module

2020-04-01 Thread Matt Martz
As of March 23 it was moved to https://github.com/ansible-collections/community.aws/blob/master/plugins/connection/aws_ssm.py On Wed, Apr 1, 2020 at 5:04 PM Gurtaj Atwell wrote: > Hi, > > Where is the location of the `aws_ssm` module? > > It used to be lib/ansible/plugins/lookup/aws_ssm.py on

[ansible-project] Location of aws_ssm module

2020-04-01 Thread Gurtaj Atwell
Hi, Where is the location of the `aws_ssm` module? It used to be lib/ansible/plugins/lookup/aws_ssm.py on the ansible repo: https://github.com/ansible/ansible I can see with a git log that is was migrated to ansible.amazon on March 9. Where is this location? gurtajatwell:~/ansible|devel⚡ ⇒

Re: [ansible-project] Re: ansible cmdb? Whats the recommended way to store facts for later retrieval?

2020-04-01 Thread Dennis McCarthy
Thanks for your reply Phil. I tried the redis option for fact caching but I'm not able to query redis for the data, only use it in my playbooks. I think you're right though. Its alot of effort so I'll probably try AWX and see if that fits the bill. Cheers. On Wed, 1 Apr 2020, 20:23 Phil

[ansible-project] Re: ansible cmdb? Whats the recommended way to store facts for later retrieval?

2020-04-01 Thread Phil Griffiths
Hi Dennis Does it have to be MySQL? The reason I ask, is that there are various cache plugins available: https://docs.ansible.com/ansible/latest/plugins/cache.html#plugin-list One such plugin is, for example, redis. You could use that and then the redis module:

Re: [ansible-project] Ansible shell command adding backslash

2020-04-01 Thread Dick Visser
Obviously this method gets you all the other constants as welll On Wed, 1 Apr 2020 at 19:53, Dick Visser wrote: > As much as I like them I would recommend against grep/cat/awk in this > case as it makes things very fragile. > Instead try to use something that PHP and ansible can both use - such

Re: [ansible-project] Ansible shell command adding backslash

2020-04-01 Thread Dick Visser
As much as I like them I would recommend against grep/cat/awk in this case as it makes things very fragile. Instead try to use something that PHP and ansible can both use - such as JSON. For example my WordPress has: define('DB_PASSWORD',

[ansible-project] Re: Any support for Windows EFS or Bitlocker?

2020-04-01 Thread 'J Hawkesworth' via Ansible Project
Not that I have heard of at the moment. Pull requests welcome of course if you do write a module. If you happen to be running in azure you can use a vm extension via the azure modules to encrypt with BitLocker. I have used that and it worked just fine. You need to wait a bit for the

[ansible-project] Ansible shell command adding backslash

2020-04-01 Thread Mark T.
Hello, - name: Determining Source Account DB Password shell: cat wp-config.php | grep DB_PASSWORD | awk -F"['']" '{print $4}' register: wp_dbpw_source If the password contains a backslash, the output doubles the number of backslashes. abc\*# becomes abc\\*# I'm aware extra escape

[ansible-project] ansible cmdb? Whats the recommended way to store facts for later retrieval?

2020-04-01 Thread Dennis McCarthy
Hi, I'm trying to set up a MySQL DB to hold all the ansible facts I produce from "ansible -m setup" (on lots of remote hosts), Store each .json file of each server in a directory but I'm having trouble finding a place to store them. *What do I want to do:* Well I've come from a puppet

Re: [ansible-project] .format() in Jinja2 filter

2020-04-01 Thread Michael Ströder
Dirk, On 4/1/20 12:17 PM, Dick Visser wrote: > It looks like you just want to have a string prepended and appended to > it - I would use regex_replace for that. Ah, yes. Missed that. Many thanks. Ciao, Michael. -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] .format() in Jinja2 filter

2020-04-01 Thread Dick Visser
It looks like you just want to have a string prepended and appended to it - I would use regex_replace for that. This playbook works: - hosts: localhost connection: local become: false gather_facts: false vars: ips: - 1.2.3.4 - 12.32.45.11 - 192.168.1.1 -

[ansible-project] .format() in Jinja2 filter

2020-04-01 Thread Michael Ströder
HI! I'd like to reformat a list of IPv4 addresses with a Python formatting string. '12.34.56.78' should be transformed into 'peername.ip=12.34.56.78%255.255.255.255'. In Python I'd just use 'peername.ip={0}%255.255.255.255'.format('12.34.56.78') How to express that in a Jinja2 filter?

Re: [ansible-project] aws efs mount connection time out

2020-04-01 Thread Dick Visser
Hi This seems to be an issue with the specifics of your environment, and not with ansible. On Wed, 1 Apr 2020 at 08:59, Sandy Hung wrote: > > Hi > > i try inbound rule add nfs port 2049 to scertiy group id > but still show error connection time out > no idea how to solved > > - name: mount

[ansible-project] aws efs mount connection time out

2020-04-01 Thread Sandy Hung
Hi i try inbound rule add nfs port 2049 to scertiy group id but still show error connection time out no idea how to solved - name: mount efs volume mount: path: "/home/ec2-user/{{ efs_vol_name }}" src: "{{ efs_fact_id }}.efs.ap-southeast-1.amazonaws.com:/"

Re: [ansible-project] Ignore imported playbooks completely when defined

2020-04-01 Thread Ronen Levinson
I assumed from the: `META: ran handlers` in the output that it's something related to the handlers. It's odd that only parsing takes 2 minutes, I know that kubespray is a big project, but 2 minutes just to parse files is a lot of time. On Wednesday, April 1, 2020 at 8:24:43 AM UTC+3, Stefan

Re: [ansible-project] Ignore imported playbooks completely when defined

2020-04-01 Thread Ronen Levinson
I assumed from the: `META: ran handlers` in the output that it's something related to the handlers. It's odd that only parsing takes 2 minutes, I know that kubespray is a big project, but 2 minutes just to parse files is a lot of time. -- You received this message because you are subscribed to

Re: [ansible-project] Ignore imported playbooks completely when defined

2020-04-01 Thread Ronen Levinson
I assumed from the: `META: ran handlers` in the output that it's something related to the handlers. It's odd that only parsing takes 2 minutes, I know that kubespray is a big project, but 2 minutes just to parse files is a lot of time. On Wednesday, April 1, 2020 at 8:24:43 AM UTC+3, Stefan

Re: [ansible-project] Re: win_xml module 'cannot call a method on a null-valued expression'

2020-04-01 Thread Dick Visser
Forget what I said - I misread. The win_xml module doesn't have a 'namespaces' option. I mixed it up with the regular xml module. On Wed, 1 Apr 2020 at 07:18, Dick Visser wrote: > Hi > > While that does work, it looks like the xpath expression is flattening too > much with all those wildcards.