Hi, all!

There is result of execute my playbook:
# ansible-playbook  test.yml 

PLAY [ldap] 
********************************************************************

...

TASK [freeipa-ds389d : Check if FreeIPA is configured] 
*************************
skipping: [ds389.example.com]
ok: [freeipa.example.com]

TASK [freeipa-ds389d : Setup FreeIPA Server] 
***********************************
fatal: [freeipa.example.com]: FAILED! => {"failed": true, "msg": "The 
conditional check 'freeipa_ipaconf.state.exist == False and 
inventory_hostname == freeipa' failed. The error was: error while 
evaluating conditional (freeipa_ipaconf.state.exist == False and 
inventory_hostname == freeipa): 'dict object' has no attribute 
'state'\n\nThe error appears to have been in 
'/root/new/freeipa-ds389d/tasks/main.yml': line 41, column 3, but may\nbe 
elsewhere in the file depending on the exact syntax problem.\n\nThe 
offending line appears to be:\n\n\n- name: Setup FreeIPA Server\n  ^ 
here\n"}
fatal: [ds389.example.com]: FAILED! => {"failed": true, "msg": "The 
conditional check 'freeipa_ipaconf.state.exist == False and 
inventory_hostname == freeipa' failed. The error was: error while 
evaluating conditional (freeipa_ipaconf.state.exist == False and 
inventory_hostname == freeipa): 'dict object' has no attribute 
'state'\n\nThe error appears to have been in 
'/root/new/freeipa-ds389d/tasks/main.yml': line 41, column 3, but may\nbe 
elsewhere in the file depending on the exact syntax problem.\n\nThe 
offending line appears to be:\n\n\n- name: Setup FreeIPA Server\n  ^ 
here\n"}

NO MORE HOSTS LEFT 
*************************************************************
 [WARNING]: Could not create retry file 'test.retry'.         [Errno 2] No 
such file or directory: ''


PLAY RECAP 
*********************************************************************
ds389.example.com          : ok=3    changed=0    unreachable=0    failed=1 
  
freeipa.example.com        : ok=5    changed=0    unreachable=0    failed=1


And there is a ansible script:
- name: Check if FreeIPA is configured
  tags:
    - setup
    - freeipa
  register: freeipa_ipaconf
  always_run: true
  stat:
    path: /etc/ipa/default.conf
  when: inventory_hostname  == freeipa

- name: Setup FreeIPA Server
  tags:
    - setup
    - freeipa
  become: true
  when: freeipa_ipaconf.state.exist == False and inventory_hostname == 
freeipa
  command: >
    {{ freeipa_install_command }}
    {{ freeipa_setup_options }}


Can you help me resolve this issue?

-- 
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 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/cb339507-44fd-4fc2-9b8a-b868e10d107b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to