-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AnsibleUndefinedVariable error #3
Comments
Could you please attach the ansible full log ?
Could be the template file has an indefined var which is undefined
On Wed, Sep 5, 2018, 21:32 Ridvan Karatas ***@***.***> wrote:
Hi,
I'm getting this error fatal: [games.mikandi.com]: FAILED! => {
"changed": false, "msg": "AnsibleUndefinedVariable: 'list object' has no
attribute 'items'" }
while it's on ansible-role-prometheus : set prometheus config yml
even if I put -vvvv it doesn't give that much details about the error. my
ansible version is 2.5.0
Any advice?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ATbnF0Z6keWiONUST6Y6rkRlMi8PWqCDks5uYBidgaJpZM4WbdYm>
.
--
*Haggai Philip Zagury*, DevOps Architect & Group Tech Lead *Tikal Knowledge
LTD*
My ideology is based on *Open thinking* & *Open techniques* - driven by
Open Source technologies & collaboration alongside *hands-on* and good
understanding of *Operating Systems*, *Applications stacks/frameworks*,
*Networking*, *Cloud* & *Cloud Native solutions*.
Look me up as *hagzag* @: <https://github.com/hagzag>
<http://linked.cin.com/in/hagzag> <https://twitter.com/hagzag>
<https://www.tikalk.com/company/employee/hagzag/>
<https://www.youtube.com/channel/UCV7lV9Lq2sc7t0QEKS4xH7A>
<https://markdowntohtml.com/#> <https://www.facebook.com/hagzag>
<https://markdowntohtml.com/#>
+972 364 88618 +972 364 88617 +972-545-302525 [email protected]
|
Hi, Here you go:
|
like I suspected you are missing some variables which are expected to be
present in the prometheus.yml file under templates:
https://github.com/shelleg/ansible-role-prometheus/blob/master/templates/prometheus.yml.j2
how does your playbook look like ?
see onne of the simple examples in the test's dir -> as an example:
https://github.com/shelleg/ansible-role-prometheus/blob/master/tests/test-prometheus.yml
On Thu, Sep 6, 2018 at 2:18 PM Ridvan Karatas ***@***.***> wrote:
Hi,
Here you go:
TASK [prometheus : set prometheus config yml]
********************************************************************************
task path:
/Users/ridvan/Desktop/Projects/ansible-mikandi-config/roles/prometheus/tasks/config-prometheus.yml:81
<games.mikandi.com> ESTABLISH SSH CONNECTION FOR USER: root <
games.mikandi.com> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o
ControlPersist=60s -o
'IdentityFile="/Users/ridvan/Desktop/Projects/ansible-mikandi-config/keys/games_rsa"'
-o KbdInteractiveAuthentication=no -o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
-o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o
ControlPath=/Users/ridvan/.ansible/cp/%h-%r games.mikandi.com '/bin/sh -c
'"'"'echo ~ && sleep 0'"'"'' <games.mikandi.com> (0, '/root\n',
'OpenSSH_7.6p1, LibreSSL 2.6.2\r\ndebug1: Reading configuration data
/etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 48: Applying
options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3
setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version
4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0
remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3:
mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive:
done pid = 11281\r\ndebug3: mux_client_request_session: session request
sent\r\ndebug1: mux_client_request_session: master session id:
2\r\n/etc/profile.d/lang.sh: line 19: warning: setlocale: LC_CTYPE: cannot
change locale (UTF-8): No such file or directory\ndebug3:
mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received
exit status from master 0\r\n') <games.mikandi.com> ESTABLISH SSH
CONNECTION FOR USER: root <games.mikandi.com> SSH: EXEC ssh -vvv -C -o
ControlMaster=auto -o ControlPersist=60s -o
'IdentityFile="/Users/ridvan/Desktop/Projects/ansible-mikandi-config/keys/games_rsa"'
-o KbdInteractiveAuthentication=no -o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
-o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o
ControlPath=/Users/ridvan/.ansible/cp/%h-%r games.mikandi.com '/bin/sh -c
'"'"'( umask 77 && mkdir -p " echo
/root/.ansible/tmp/ansible-tmp-1536232463.4-179002939826161 " && echo
ansible-tmp-1536232463.4-179002939826161=" echo
/root/.ansible/tmp/ansible-tmp-1536232463.4-179002939826161 `" ) && sleep
0'"'"''
<games.mikandi.com> (0,
'ansible-tmp-1536232463.4-179002939826161=/root/.ansible/tmp/ansible-tmp-1536232463.4-179002939826161\n',
'OpenSSH_7.6p1, LibreSSL 2.6.2\r\ndebug1: Reading configuration data
/etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 48: Applying
options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3
setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version
4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0
remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3:
mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive:
done pid = 11281\r\ndebug3: mux_client_request_session: session request
sent\r\ndebug1: mux_client_request_session: master session id:
2\r\n/etc/profile.d/lang.sh: line 19: warning: setlocale: LC_CTYPE: cannot
change locale (UTF-8): No such file or directory\ndebug3:
mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received
exit status from master 0\r\n')
<games.mikandi.com> ESTABLISH SSH CONNECTION FOR USER: root
<games.mikandi.com> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o
ControlPersist=60s -o
'IdentityFile="/Users/ridvan/Desktop/Projects/ansible-mikandi-config/keys/games_rsa"'
-o KbdInteractiveAuthentication=no -o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
-o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o
ControlPath=/Users/ridvan/.ansible/cp/%h-%r games.mikandi.com '/bin/sh -c
'"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1536232463.4-179002939826161/
> /dev/null 2>&1 && sleep 0'"'"''
<games.mikandi.com> (0, '', 'OpenSSH_7.6p1, LibreSSL 2.6.2\r\ndebug1:
Reading configuration data /etc/ssh/ssh_config\r\ndebug1:
/etc/ssh/ssh_config line 48: Applying options for *\r\ndebug1: auto-mux:
Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2:
mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards:
request forwardings: 0 local, 0 remote\r\ndebug3:
mux_client_request_session: entering\r\ndebug3: mux_client_request_alive:
entering\r\ndebug3: mux_client_request_alive: done pid = 11281\r\ndebug3:
mux_client_request_session: session request sent\r\ndebug1:
mux_client_request_session: master session id: 2\r\n/etc/profile.d/lang.sh:
line 19: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No
such file or directory\ndebug3: mux_client_read_packet: read header failed:
Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
fatal: [games.mikandi.com]: FAILED! => {
"changed": false,
"msg": "AnsibleUndefinedVariable: 'list object' has no attribute 'items'"
}
to retry, use: --limit
@/Users/ridvan/Desktop/Projects/ansible-mikandi-config/prometheus.retry
PLAY RECAP
*******************************************************************************************************************
games.mikandi.com : ok=26 changed=0 unreachable=0 failed=1 `
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATbnF8ljOx8JBgUjwthrj1IPAYyjYt2Bks5uYQSZgaJpZM4WbdYm>
.
--
*Haggai Philip Zagury*, DevOps Architect & Group Tech Lead *Tikal Knowledge
LTD*
My ideology is based on *Open thinking* & *Open techniques* - driven by
Open Source technologies & collaboration alongside *hands-on* and good
understanding of *Operating Systems*, *Applications stacks/frameworks*,
*Networking*, *Cloud* & *Cloud Native solutions*.
Look me up as *hagzag* @: <https://github.com/hagzag>
<http://linked.cin.com/in/hagzag> <https://twitter.com/hagzag>
<https://www.tikalk.com/company/employee/hagzag/>
<https://www.youtube.com/channel/UCV7lV9Lq2sc7t0QEKS4xH7A>
<https://markdowntohtml.com/#> <https://www.facebook.com/hagzag>
<https://markdowntohtml.com/#>
+972 364 88618 +972 364 88617 +972-545-302525 [email protected]
|
Hi, I exactly copied prometheus.yml.j2 file under templates folder. Do I need to add anything else? Here is how my playbook look like:
|
Hi,
I'm getting this error
fatal: [games.mikandi.com]: FAILED! => { "changed": false, "msg": "AnsibleUndefinedVariable: 'list object' has no attribute 'items'" }
while it's on
ansible-role-prometheus : set prometheus config yml
even if I put -vvvv it doesn't give that much details about the error. my ansible version is 2.5.0
Any advice?
The text was updated successfully, but these errors were encountered: