Merge "Use correct python version for puppet-docker.py"
This commit is contained in:
commit
480a2320fd
@ -3,6 +3,20 @@
|
||||
##################################################
|
||||
# Step 1 block, write data for subsequent steps
|
||||
##################################################
|
||||
- name: gather facts needed by role
|
||||
setup:
|
||||
gather_subset: "!min,python"
|
||||
when: ansible_python is not defined
|
||||
|
||||
- name: set python_cmd
|
||||
set_fact:
|
||||
python_cmd: "python{{ ansible_python.version.major }}"
|
||||
cacheable: true
|
||||
when: python_cmd is not defined
|
||||
|
||||
- name: print python facts
|
||||
debug:
|
||||
msg: "python_cmd: {{ python_cmd }}"
|
||||
|
||||
- name: Write config data at the start of step 1
|
||||
when: step == "1"
|
||||
@ -385,7 +399,7 @@
|
||||
######################################
|
||||
|
||||
- name: Run docker-puppet tasks (generate config) during step {{ step }}
|
||||
shell: python /var/lib/docker-puppet/docker-puppet.py
|
||||
shell: "{{ python_cmd }} /var/lib/docker-puppet/docker-puppet.py"
|
||||
environment:
|
||||
NET_HOST: 'true'
|
||||
DEBUG: '{{ docker_puppet_debug | default(false) }}'
|
||||
@ -479,7 +493,7 @@
|
||||
- container_config_tasks
|
||||
|
||||
- name: Run docker-puppet tasks (bootstrap tasks) for step {{ step }}
|
||||
shell: python /var/lib/docker-puppet/docker-puppet.py
|
||||
shell: "{{ python_cmd }} /var/lib/docker-puppet/docker-puppet.py"
|
||||
environment:
|
||||
CONFIG: /var/lib/docker-puppet/{{ ansible_check_mode | ternary('check-mode/', '') }}docker-puppet-tasks{{ step }}.json
|
||||
CONFIG_VOLUME_PREFIX: '/var/lib/config-data{{ ansible_check_mode | ternary("/check-mode", "") }}'
|
||||
|
Loading…
x
Reference in New Issue
Block a user