<commit_before># worker nodes playbook
# this assumes that you've already run the bootstrap role as root.
--- 
- hosts: worker-nodes
  name: add head node ansible user key to authorized_keys
  assemble: src=~/.ssh/id.rsa.pub dest=/home/ansible/.ssh/authorized_keys owner=ansible:ansible mode=400 remote_src=False
  tags:
    - bootstrap
    - keys


- hosts: worker-nodes
  name: Prepare worker nodes
  user: ansible
  sudo: true
  roles:
    - worker-node


- hosts: worker-nodes
  name: Apply the common role and CA certs
  user: ansible
  sudo: true
  roles:
    - common
    - certificates
  vars_files:<commit_msg>Merging with working worker node playbook<commit_after># worker nodes playbook
# this assumes that you've already run the bootstrap role as root.
--- 
- hosts: cluster-head-nodes
  name: Look up local facts and create key vars file
  connection: local
  tasks: 
  - setup:
  - debug: msg="key is {{ ansible_ssh_host_key_rsa_public }} "
  - local_action: lineinfile dest=roles/worker-node/vars/public_keys.yml line="public_keys{{':'}} ssh-rsa {{ ansible_ssh_host_key_rsa_public }} ansible@{{ ansible_hostname }}" state=present create=yes

- hosts: worker-nodes
  name: Add head node 
  user: root
  template: src=etc/ssh/shosts.equiv.j2 dest=/etc/ssh/shosts.equiv

- hosts: worker-nodes
  name: add head node public key to WN authorized_keys
  user: root
  vars_files:
  - roles/worker-node/vars/public_keys.yml
  tasks:
   - debug: var=public_keys
   - lineinfile: dest=/root/.ssh/authorized_keys line="{{ public_keys }}" state=present create=yes mode=400 
   - lineinfile: dest=/home/ansible/.ssh/authorized_keys line="{{ public_keys }}" state=present create=yes owner=ansible group=ansible
  tags:
    - keys

- hosts: worker-nodes
  name: Prepare worker nodes
  user: ansible
  sudo: true
  roles:
    - worker-node


- hosts: worker-nodes
  name: Apply the common role and CA certs
  user: ansible
  sudo: true
  roles:
    - common
    - certificates
  vars_files:
{'fraction_non_alphanumeric': 0.1011066398390342, 'fraction_numerical': 0.0035211267605633804, 'mean_word_length': 3.541095890410959, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5075292', 'n_tokens_mistral': 680, 'n_tokens_neox': 648, 'n_words': 190}