Comments (4)
Okay, and you are 100% sure it is an issue with the action and not Ansible?
from action-ansible-playbook.
@dawidd6 Sorry for the late response.
Here is my ansible playbook CLI:
ansible-playbook [core 2.12.10]
config file = None
configured module search path = ['/Users/charles.murphy/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/homebrew/lib/python3.11/site-packages/ansible
ansible collection location = /Users/charles.murphy/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/homebrew/bin/ansible-playbook
python version = 3.11.4 (main, Jul 25 2023, 17:36:13) [Clang 14.0.3 (clang-1403.0.22.14.1)]
jinja version = 3.1.2
libyaml = True
Here is a playbook:
- name: Show ansible vars
debug:
var: vars['{{item}}']
loop:
- 'abc'
- 'string'
- 'boolean'
Here is my command:
➜ ansible git:(ecr-pull-user-playbook) ✗ ansible-playbook sui/sanity.local.yaml -e '{"abc": "xyz", "string": "true", "boolean": true}'
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [Sanity Test (local)] *****************************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************************
ok: [localhost]
TASK [sanity : Show ansible vars] **********************************************************************************************************************************************
ok: [localhost] => (item=abc) => {
"ansible_loop_var": "item",
"item": "abc",
"vars['abc']": "xyz"
}
ok: [localhost] => (item=string) => {
"ansible_loop_var": "item",
"item": "string",
"vars['string']": "true"
}
ok: [localhost] => (item=boolean) => {
"ansible_loop_var": "item",
"item": "boolean",
"vars['boolean']": true
}
TASK [Run tree command on selected directories] ********************************************************************************************************************************
skipping: [localhost]
PLAY RECAP *********************************************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
This works as expected on the command line.
from action-ansible-playbook.
Don't know if that makes any difference, but in the action input you are surrounding your extra vars with double quotes and in the cli it is single quotes. Try using the same quotes here and there.
from action-ansible-playbook.
ok, thanks. i will try it next time i run into the problem.
from action-ansible-playbook.
Related Issues (20)
- NodeJS 12 is depreciated in GitHub Actions
- save-state command is depreciated warning HOT 3
- Feature request: ansible-galaxy install force flag HOT 2
- SSH Tunneling Bastion HOT 2
- Ansible Galaxy : command not found HOT 2
- Error on windows-latest runner HOT 2
- Missing playbook HOT 6
- Ensure SSH private key uses LF and not CRLF HOT 4
- ansible-playbook not found on private runner HOT 1
- private key permission problem HOT 1
- How to pass multiple extra variables? HOT 1
- Galaxy SSH configuration? HOT 4
- make action fail if no hosts were updated HOT 1
- make separate location for ansible vault file possible HOT 2
- Node16 deprecated HOT 2
- vault_password not being set? HOT 1
- Ansible inventory requires additional Python packages HOT 1
- Playbook keeps failing when using GA HOT 3
- How to install pip package in the same environment where ansible run HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-ansible-playbook.