How did you solve the issue (what did you mean by below)? I haven't had time to
look into the root cause of this yet.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an e
I had the same problem and made the change below to fix the issue.
On Monday, August 3, 2015 at 3:43:25 PM UTC-4, Michael Perzel wrote:
>
> I recently upgrade to ansible 1.9.2 and am now having issues with the
> splatting. I looked at
> https://github.com/cchurch/ansible/blob/e9b6aaf5d8836ce7f
Worth trying current dev if you can as I think the way parameters are passed
has changed.
All the best, Jon
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
t
I recently upgrade to ansible 1.9.2 and am now having issues with the
splatting. I looked
at
https://github.com/cchurch/ansible/blob/e9b6aaf5d8836ce7ffdca855e006c2131fe19632/lib/ansible/runner/shell_plugins/powershell.py
since that fixed it last time. THe only change that wasn't still there wa
I updated the test_win_script role in my fork to use the filter and confirm
the output matches the expected results.
On Monday, February 23, 2015 at 3:54:12 PM UTC-6, Michael Perzel wrote:
>
> Victory! I'll add a few tests for invalid data and send in a pull request.
>
> TEST_FLAGS="-t test_powe
Victory! I'll add a few tests for invalid data and send in a pull request.
TEST_FLAGS="-t test_powershell_filter -i /etc/ansible/hosts" make test_winrm
ansible-playbook test_winrm.yml -i inventory.winrm -e
@integration_config.yml -v -t test_powershell_filter -i /etc/ansible/hosts
[WARNING]: Th
I changed my directory so that test_winrm was in the current directory. But
now I get an error message complaining it can't find the win_file module. I
assume its not finding my ansible-module checkout.
ansible/test/integration> TEST_FLAGS="-t test_powershell_filter -i
/etc/ansible/hosts" make
I updated test_winrm.yml to include my role but when I tried to run
ansible-source/ansible> TEST_FLAGS="-t test_powershell_filter" make
test_winrm
make: *** No rule to make target `test_winrm'. Stop.
Did you need to make changes to the Makefile in order for this to work?
I updated my playbook
Add your new test role to test/integration/test_winrm.yml with a matching
tag, then run:
TEST_FLAGS="-t test_powershell_filter" make test_winrm
It may be worthwhile to add to the test_win_script role to make sure your
filter works for passing parameters to a PowerShell script.
Also, from your t
This isn't directly related to this thread but it was discussed earlier so
it was the best place for it.
I created a filter that converts a yaml dict to a powershell hash. I'm
trying to write some tests for it but I'm not sure how to run just my
specific test. The file playbook and vars are
at
Hi Michael,
I had submitted a PR (https://github.com/ansible/ansible/pull/9602) -- I'll
see if I can get that merged soon.
On Mon, Jan 26, 2015 at 2:47 PM, Michael Perzel
wrote:
> I ended up creating a new filter that could transform
>
>
> installArguments:
>
> key: value
>
> key2:
I ended up creating a new filter that could transform
installArguments:
key: value
key2: value2
and return “@{'key2'='value2';'key'='value';}” I can share if anyone is
interested.
I just upgraded to ansible 1.8 and made your fix to powershell.py and
winrm.py manually again. Is
Absolutely, just haven't had a chance to get back to Windows-related things
this week.
On Thu, Nov 6, 2014 at 4:37 PM, Michael Perzel
wrote:
> Are you going to submit a pull request for this into devel? It definitely
> solved my issue.
>
> On Saturday, October 25, 2014 2:23:55 PM UTC-5, Chris Ch
Are you going to submit a pull request for this into devel? It definitely
solved my issue.
On Saturday, October 25, 2014 2:23:55 PM UTC-5, Chris Church wrote:
>
> Could you create a gist (https://gist.github.com/) with the relevant
> lines from your inventory variables, playbook and script (remo
Alright, I made your changes in your 1.7.2 branch and it works if the
variables are defined with quotes in the following order (I updated the
gist to reflect this).
vars:
installArguments: "@{key='value'}"
although it echo's the hash value correctly (it is just "value" maybe not
the best
Take a look at this
gist: https://gist.github.com/perzizzle/b3e13af9e94d9fbb7970/download
It contains a simple playbook that calls a deploy.ps1 that should echo back
installArguments (which is a powershell array). I tried a few different
ways of quoting it with your patch applied but I get argu
Could you create a gist (https://gist.github.com/) with the relevant lines
from your inventory variables, playbook and script (removing any sensitive
information)? I'm not quite able to piece together a full example of what
you're running from the email thread.
My branch is based on devel; I just
I tried taking your changes but it failed with:
http://schemas.microsoft.com/powershell/2004/04";>C:\Users\ansible\AppData\Local\Temp\ansible-tmp-1414187414.25-97343749557638\de_x000D__x000A_ployLauncher.ps1 : A positional parameter cannot be found that
accepts _x000D__x000A_argument
'False'._x00
Your idea with jinja filter is what I originally tried to get working. I
never managed it but I think its the ideal solution (converting yaml hash
to a powershell one).
If I follow your patch you added a parameter that controls whether or not
arguments get quoted (and set it to false for power
That method of passing arguments is apparently called "splatting" (
http://technet.microsoft.com/en-us/magazine/gg675931.aspx).
I have a branch where I've been able to get it working:
https://github.com/cchurch/ansible/tree/powershell_splatting
I've also added integration tests to show examples
I'll look into this. My work around thus far is using a template for my
deploy script. Instead of passing the deploy script arguments, I just
assign them at the top:
$build = {{ build }}
$pass = {{ password }}
$arguments = @{ {{ arguments }} }
This then becomes:
$build = 42
$pass = password
$a
>
> I don't have a direct answer for this - rightly or wrongly the ps1 scripts
> I have so far don't take any arguments - I consider them to be specific to
> my roles and at the moment they embed some details that it would probably
> be best to have as parameters. However, it looks to me like
Sorry, I think I mispoke here.
"script" is one of those that works on both platforms.
What you have above is more of a quoting question with what arguments you
are passing to the script, not the contents, so that won't help...
We can investigate, but perhaps others might know the answer to this
Can you provide a link to the win_script module? I don't see it in the
ansible documentation.
I'm using ansible 1.7.2. I've confirmed the issue is caused by my variable
including an equal sign. I need to quote my variable {{ "var" }} in the
playbook, but when this variable is used in the script
Possibly easier to use the win_script module maybe?
Ansible shouldn't be adding any extra spaces here though, particularly not
in recent versions.
On Mon, Oct 20, 2014 at 12:21 PM, Michael Perzel
wrote:
> I am having trouble getting ansible to parse my variable values correctly.
>
> I have de
I am having trouble getting ansible to parse my variable values correctly.
I have defined a variable:
installArguments: "appPoolName='UiService'; dbPassword='password';
dbUserId='user'"
I then have a playbook that makes the following call:
- name: Deploy Launcher
script: deployLauncher.ps1 -en
26 matches
Mail list logo