|
88 | 88 | kayobe_galaxy_requirements_src_dir: "{{ kolla_ansible_src_dir }}"
|
89 | 89 | kayobe_galaxy_requirements_dest_path: "/tmp/kolla-ansible-requirements.yml"
|
90 | 90 |
|
| 91 | + # NOTE(wszumski): I explored running as an unprivileged user, but it looked like |
| 92 | + # a world of pain, so I've gone for this simpler approach (for now). |
| 93 | + - block: |
| 94 | + - name: Ensure inventory host_vars directories exist |
| 95 | + file: |
| 96 | + state: directory |
| 97 | + path: "{{ item }}" |
| 98 | + loop: |
| 99 | + - "{{ kayobe_config_src_dir }}/etc/kayobe/inventory/host_vars/" |
| 100 | + - "{{ kayobe_config_src_dir }}/etc/kayobe/kolla/inventory/host_vars/" |
| 101 | + |
| 102 | + - name: Configure the become checker for localhost (kayobe) |
| 103 | + # NOTE(wszumski): This will cause all uses of become to fail when running |
| 104 | + # kayobe playbooks against localhost. This should not happen since we |
| 105 | + # have disabled escalation of privileges with kayobe_control_host_become. |
| 106 | + # If you hit this error you will need to change your task to respect |
| 107 | + # that variable. |
| 108 | + copy: |
| 109 | + content: | |
| 110 | + ansible_become_exe: "{{ kayobe_src_dir }}/dev/kayobe-control-host-become-sudo-checker" |
| 111 | + dest: "{{ kayobe_config_src_dir }}/etc/kayobe/inventory/host_vars/localhost" |
| 112 | + |
| 113 | + - name: Configure the become checker for localhost (kolla) |
| 114 | + # NOTE(wszumski): This will cause all uses of become to fail when running |
| 115 | + # kolla playbooks against localhost. This should not happen since we |
| 116 | + # have disabled escalation of privileges with kayobe_control_host_become. |
| 117 | + # If you hit this error you will need to change kolla-ansible to not use |
| 118 | + # become unless necessary. |
| 119 | + copy: |
| 120 | + content: | |
| 121 | + ansible_become_exe: "{{ kayobe_src_dir }}/dev/kolla-control-host-become-sudo-checker" |
| 122 | + dest: "{{ kayobe_config_src_dir }}/etc/kayobe/kolla/inventory/host_vars/localhost" |
| 123 | + |
| 124 | + when: not kayobe_control_host_become | bool |
| 125 | + |
| 126 | + # NOTE(wszumski): Use the name zz-10-overrides.yml to ensure this takes |
| 127 | + # precedence over the standard config files, but can control order with the |
| 128 | + # priority (number after zz). |
| 129 | + - name: Ensure kayobe-config override config file exists |
| 130 | + template: |
| 131 | + src: overrides.yml.j2 |
| 132 | + dest: "{{ kayobe_config_src_dir }}/etc/kayobe/zz-10-overrides.yml" |
| 133 | + |
91 | 134 | - block:
|
92 | 135 | - name: Ensure previous kayobe directory exists
|
93 | 136 | file:
|
|
0 commit comments