- name: Add the nodepool group group: name: nodepool state: present gid: '{{ nodepool_base_nodepool_gid }}' - name: Add the nodepool user user: name: nodepool group: nodepool home: /home/nodepool create_home: yes shell: /bin/bash uid: '{{ nodepool_base_nodepool_uid }}' - name: Install zookeeper include_role: name: install-zookeeper when: nodepool_base_install_zookeeper - name: Sync project-config include_role: name: sync-project-config - name: Create nodepool config dir file: name: /etc/nodepool state: directory owner: nodepool group: nodepool mode: 0755 - name: Look for a host specific config file stat: path: /opt/project-config/nodepool/{{ inventory_hostname }}.yaml register: host_config_file - name: Set config file symlink file: state: link src: '{{ host_config_file.stat.exists | ternary(host_config_file.stat.path, "/opt/project-config/nodepool/nodepool.yaml") }}' dest: /etc/nodepool/nodepool.yaml - name: Symlink in elements from project-config repo file: state: link src: /opt/project-config/nodepool/elements dest: /etc/nodepool/elements