On 14. mars 2017 16:35, Joost Ringoot wrote:
I have this playbook,... that used to work in a previous version of
ansible, I swear it did:

cat ansible/playbooks/apt/sssdconfig.yml
---
- hosts: "{{hosts}}"

I wouldn't use a variable named the same as a directive.


#  accelerate: true
  remote_user: root
  tasks:
  - name: install auth-client-config
    apt: name=auth-client-config state=installed
  - name: install sssd client
    apt: name=sssd state=installed
  - name: install ldap pam module
    apt: name=libpam-ldap state=installed
  - name: configure authentication
    command: /usr/sbin/auth-client-config --enablesssd --enablesssdauth 
--enablelocauthorize
--enablepamaccess --enablemkhomedir --update
  - name: make sure the config directory is present ( workaround for a bug
in sssd package)
    command: /bin/mkdir -p /etc/sssd
  - name: use a template sssd.conf
    copy: src=/home/florence/ansible/files/sssd.conf dest=/etc/sssd
  - name: ensure correct acl for the sssd directory
    file: path=/etc/sssd mode=0600
  - name: ensure correct acl for the sssd.conf file
    file: path=/etc/sssd/sssd.conf mode=0600
  - name: restart sssd
    service: name=sssd enabled=yes state=restarted

But now this happens:

 ansible-playbook  /home/florence/ansible/playbooks/apt/sssdconfig.yml -e
cal-30
ERROR! the field 'hosts' has an invalid value, which appears to include a
variable that is undefined. The error was: 'hosts' is undefined

The variable hosts is not set, and your -e should be key=value.
Are you trying to write -e hosts=cal-30 ?

--
Kai Stian Olstad

--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5f487d7b-fc96-5a5d-25c5-1c6a61635ca3%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to