Use correct python version for puppet-docker.py
Now that we are running this at fedora28 with python3 we need to use python3 to run python scripts at playbooks Depends-On: I2c471724374da44eeddc4680b268bc362572ee27 Closes-Bug: #1802531 Change-Id: I42b18b228bfe361d19b580a853328c1a6c896257
This commit is contained in:
parent
c1bf5d8b10
commit
851bd0953a
@ -3,6 +3,20 @@
|
|||||||
##################################################
|
##################################################
|
||||||
# Step 1 block, write data for subsequent steps
|
# 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
|
- name: Write config data at the start of step 1
|
||||||
when: step == "1"
|
when: step == "1"
|
||||||
@ -385,7 +399,7 @@
|
|||||||
######################################
|
######################################
|
||||||
|
|
||||||
- name: Run docker-puppet tasks (generate config) during step {{ step }}
|
- 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:
|
environment:
|
||||||
NET_HOST: 'true'
|
NET_HOST: 'true'
|
||||||
DEBUG: '{{ docker_puppet_debug | default(false) }}'
|
DEBUG: '{{ docker_puppet_debug | default(false) }}'
|
||||||
@ -479,7 +493,7 @@
|
|||||||
- container_config_tasks
|
- container_config_tasks
|
||||||
|
|
||||||
- name: Run docker-puppet tasks (bootstrap tasks) for step {{ step }}
|
- 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:
|
environment:
|
||||||
CONFIG: /var/lib/docker-puppet/{{ ansible_check_mode | ternary('check-mode/', '') }}docker-puppet-tasks{{ step }}.json
|
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", "") }}'
|
CONFIG_VOLUME_PREFIX: '/var/lib/config-data{{ ansible_check_mode | ternary("/check-mode", "") }}'
|
||||||
|
Loading…
Reference in New Issue
Block a user