Fix issues with nxos_os_install module (#48811)
* Use expect module to copy files * Remove old and redundant upgrade files * Return error message instead of code * Cleanup copy command code * Fix force issue in nxos_install_os * new nxos_install_os integration tests * Uncomment transport tests * Revert negative test change * Remove combined option that is no longer required * Make shippable happy * Add n5k test files
This commit is contained in:
parent
10095a397c
commit
a721572206
32 changed files with 492 additions and 185 deletions
|
@ -187,7 +187,7 @@ class Cli:
|
||||||
message = getattr(e, 'err', e)
|
message = getattr(e, 'err', e)
|
||||||
err = to_text(message, errors='surrogate_then_replace')
|
err = to_text(message, errors='surrogate_then_replace')
|
||||||
if opts.get('ignore_timeout') and code:
|
if opts.get('ignore_timeout') and code:
|
||||||
responses.append(code)
|
responses.append(err)
|
||||||
return responses
|
return responses
|
||||||
elif code and 'no graceful-restart' in err:
|
elif code and 'no graceful-restart' in err:
|
||||||
if 'ISSU/HA will be affected if Graceful Restart is disabled' in err:
|
if 'ISSU/HA will be affected if Graceful Restart is disabled' in err:
|
||||||
|
|
|
@ -308,9 +308,12 @@ def copy_file_from_remote(module, local, local_file_directory, file_system='boot
|
||||||
child.expect('#')
|
child.expect('#')
|
||||||
ldir += each + '/'
|
ldir += each + '/'
|
||||||
|
|
||||||
command = ('copy scp://' + module.params['remote_scp_server_user'] +
|
cmdroot = 'copy scp://'
|
||||||
'@' + module.params['remote_scp_server'] + module.params['remote_file'] +
|
ruser = module.params['remote_scp_server_user'] + '@'
|
||||||
' ' + file_system + ldir + local + ' vrf management')
|
rserver = module.params['remote_scp_server']
|
||||||
|
rfile = module.params['remote_file'] + ' '
|
||||||
|
vrf = ' vrf management'
|
||||||
|
command = (cmdroot + ruser + rserver + rfile + file_system + ldir + local + vrf)
|
||||||
|
|
||||||
child.sendline(command)
|
child.sendline(command)
|
||||||
# response could be remote host connection time out,
|
# response could be remote host connection time out,
|
||||||
|
|
|
@ -205,6 +205,7 @@ def parse_show_install(data):
|
||||||
ud['disruptive'] = False
|
ud['disruptive'] = False
|
||||||
ud['upgrade_needed'] = False
|
ud['upgrade_needed'] = False
|
||||||
ud['error'] = False
|
ud['error'] = False
|
||||||
|
ud['invalid_command'] = False
|
||||||
ud['install_in_progress'] = False
|
ud['install_in_progress'] = False
|
||||||
ud['server_error'] = False
|
ud['server_error'] = False
|
||||||
ud['upgrade_succeeded'] = False
|
ud['upgrade_succeeded'] = False
|
||||||
|
@ -228,6 +229,7 @@ def parse_show_install(data):
|
||||||
ud['error'] = True
|
ud['error'] = True
|
||||||
break
|
break
|
||||||
if re.search(r'[I|i]nvalid command', x):
|
if re.search(r'[I|i]nvalid command', x):
|
||||||
|
ud['invalid_command'] = True
|
||||||
ud['error'] = True
|
ud['error'] = True
|
||||||
break
|
break
|
||||||
if re.search(r'No install all data found', x):
|
if re.search(r'No install all data found', x):
|
||||||
|
@ -241,6 +243,9 @@ def parse_show_install(data):
|
||||||
if re.search(r'Backend processing error', x):
|
if re.search(r'Backend processing error', x):
|
||||||
ud['server_error'] = True
|
ud['server_error'] = True
|
||||||
break
|
break
|
||||||
|
if re.search(r'timed out', x):
|
||||||
|
ud['server_error'] = True
|
||||||
|
break
|
||||||
if re.search(r'^(-1|5\d\d)$', x):
|
if re.search(r'^(-1|5\d\d)$', x):
|
||||||
ud['server_error'] = True
|
ud['server_error'] = True
|
||||||
break
|
break
|
||||||
|
@ -343,7 +348,7 @@ def massage_install_data(data):
|
||||||
return result_data
|
return result_data
|
||||||
|
|
||||||
|
|
||||||
def build_install_cmd_set(issu, image, kick, type):
|
def build_install_cmd_set(issu, image, kick, type, force=True):
|
||||||
commands = ['terminal dont-ask']
|
commands = ['terminal dont-ask']
|
||||||
|
|
||||||
# Different NX-OS plaforms behave differently for
|
# Different NX-OS plaforms behave differently for
|
||||||
|
@ -355,6 +360,7 @@ def build_install_cmd_set(issu, image, kick, type):
|
||||||
# 2) Separate kickstart + system images.
|
# 2) Separate kickstart + system images.
|
||||||
# * Omit hidden 'force' option for issu.
|
# * Omit hidden 'force' option for issu.
|
||||||
# * Use hidden 'force' option for disruptive upgrades.
|
# * Use hidden 'force' option for disruptive upgrades.
|
||||||
|
# * Note: Not supported on all platforms
|
||||||
if re.search(r'required|desired|yes', issu):
|
if re.search(r'required|desired|yes', issu):
|
||||||
if kick is None:
|
if kick is None:
|
||||||
issu_cmd = 'non-disruptive'
|
issu_cmd = 'non-disruptive'
|
||||||
|
@ -364,7 +370,7 @@ def build_install_cmd_set(issu, image, kick, type):
|
||||||
if kick is None:
|
if kick is None:
|
||||||
issu_cmd = ''
|
issu_cmd = ''
|
||||||
else:
|
else:
|
||||||
issu_cmd = 'force'
|
issu_cmd = 'force' if force else ''
|
||||||
|
|
||||||
if type == 'impact':
|
if type == 'impact':
|
||||||
rootcmd = 'show install all impact'
|
rootcmd = 'show install all impact'
|
||||||
|
@ -411,6 +417,7 @@ def check_mode_legacy(module, issu, image, kick=None):
|
||||||
# Process System Image
|
# Process System Image
|
||||||
data['error'] = False
|
data['error'] = False
|
||||||
tsver = 'show version image bootflash:%s' % image
|
tsver = 'show version image bootflash:%s' % image
|
||||||
|
data['upgrade_cmd'] = [tsver]
|
||||||
target_image = parse_show_version(execute_show_command(module, tsver))
|
target_image = parse_show_version(execute_show_command(module, tsver))
|
||||||
if target_image['error']:
|
if target_image['error']:
|
||||||
data['error'] = True
|
data['error'] = True
|
||||||
|
@ -423,6 +430,7 @@ def check_mode_legacy(module, issu, image, kick=None):
|
||||||
# Process Kickstart Image
|
# Process Kickstart Image
|
||||||
if kick is not None and not data['error']:
|
if kick is not None and not data['error']:
|
||||||
tkver = 'show version image bootflash:%s' % kick
|
tkver = 'show version image bootflash:%s' % kick
|
||||||
|
data['upgrade_cmd'].append(tsver)
|
||||||
target_kick = parse_show_version(execute_show_command(module, tkver))
|
target_kick = parse_show_version(execute_show_command(module, tkver))
|
||||||
if target_kick['error']:
|
if target_kick['error']:
|
||||||
data['error'] = True
|
data['error'] = True
|
||||||
|
@ -432,6 +440,7 @@ def check_mode_legacy(module, issu, image, kick=None):
|
||||||
data['disruptive'] = True
|
data['disruptive'] = True
|
||||||
upgrade_msg = upgrade_msg + ' kickstart: %s' % tkver
|
upgrade_msg = upgrade_msg + ' kickstart: %s' % tkver
|
||||||
|
|
||||||
|
data['list_data'] = data['raw']
|
||||||
data['processed'] = upgrade_msg
|
data['processed'] = upgrade_msg
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
@ -451,6 +460,7 @@ def check_mode_nextgen(module, issu, image, kick=None):
|
||||||
data = check_install_in_progress(module, commands, opts)
|
data = check_install_in_progress(module, commands, opts)
|
||||||
if data['server_error']:
|
if data['server_error']:
|
||||||
data['error'] = True
|
data['error'] = True
|
||||||
|
data['upgrade_cmd'] = commands
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
@ -472,6 +482,11 @@ def check_mode(module, issu, image, kick=None):
|
||||||
# impact data from the 'show install all impact' command.
|
# impact data from the 'show install all impact' command.
|
||||||
# Fallback to legacy method.
|
# Fallback to legacy method.
|
||||||
data = check_mode_legacy(module, issu, image, kick)
|
data = check_mode_legacy(module, issu, image, kick)
|
||||||
|
if data['invalid_command']:
|
||||||
|
# If we are upgrading from a device running a separate kickstart and
|
||||||
|
# system image the impact command will fail.
|
||||||
|
# Fallback to legacy method.
|
||||||
|
data = check_mode_legacy(module, issu, image, kick)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
@ -507,6 +522,12 @@ def do_install_all(module, issu, image, kick=None):
|
||||||
# The system may be busy from the call to check_mode so loop until
|
# The system may be busy from the call to check_mode so loop until
|
||||||
# it's done.
|
# it's done.
|
||||||
upgrade = check_install_in_progress(module, commands, opts)
|
upgrade = check_install_in_progress(module, commands, opts)
|
||||||
|
if upgrade['invalid_command'] and 'force' in commands[1]:
|
||||||
|
# Not all platforms support the 'force' keyword. Check for this
|
||||||
|
# condition and re-try without the 'force' keyword if needed.
|
||||||
|
commands = build_install_cmd_set(issu, image, kick, 'install', False)
|
||||||
|
upgrade = check_install_in_progress(module, commands, opts)
|
||||||
|
upgrade['upgrade_cmd'] = commands
|
||||||
|
|
||||||
# Special case: If we encounter a server error at this stage
|
# Special case: If we encounter a server error at this stage
|
||||||
# it means the command was sent and the upgrade was started but
|
# it means the command was sent and the upgrade was started but
|
||||||
|
@ -558,11 +579,8 @@ def main():
|
||||||
|
|
||||||
install_result = do_install_all(module, issu, sif, kick=kif)
|
install_result = do_install_all(module, issu, sif, kick=kif)
|
||||||
if install_result['error']:
|
if install_result['error']:
|
||||||
msg = "Failed to upgrade device using image "
|
cmd = install_result['upgrade_cmd']
|
||||||
if kif:
|
msg = 'Failed to upgrade device using command: %s' % cmd
|
||||||
msg = msg + "files: kickstart: %s, system: %s" % (kif, sif)
|
|
||||||
else:
|
|
||||||
msg = msg + "file: system: %s" % sif
|
|
||||||
module.fail_json(msg=msg, raw_data=install_result['list_data'])
|
module.fail_json(msg=msg, raw_data=install_result['list_data'])
|
||||||
|
|
||||||
state = install_result['processed']
|
state = install_result['processed']
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||||
|
|
||||||
- name: run test cases (ansible_connection=httpapi)
|
- name: run test cases (ansible_connection=httpapi)
|
||||||
include: "{{ test_case_to_run }} ansible_connection=httpapi"
|
include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
|
||||||
with_items: "{{ test_items }}"
|
with_items: "{{ test_items }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: test_case_to_run
|
loop_var: test_case_to_run
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||||
|
|
||||||
- name: run test cases (ansible_connection=network_cli)
|
- name: run test cases (ansible_connection=network_cli)
|
||||||
include: "{{ test_case_to_run }} ansible_connection=network_cli"
|
include: "{{ test_case_to_run }} ansible_connection=network_cli connection={{ cli }}"
|
||||||
with_items: "{{ test_items }}"
|
with_items: "{{ test_items }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: test_case_to_run
|
loop_var: test_case_to_run
|
||||||
|
|
|
@ -4,24 +4,25 @@
|
||||||
when: ansible_connection == 'httpapi'
|
when: ansible_connection == 'httpapi'
|
||||||
|
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml
|
- include: targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml
|
||||||
when: connection is not defined
|
|
||||||
|
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/enable_scp_server_provider.yaml
|
|
||||||
when: connection is defined
|
|
||||||
|
|
||||||
- name: "Copy {{ si }} to bootflash"
|
- name: "Copy {{ si }} to bootflash"
|
||||||
nxos_file_copy:
|
nxos_file_copy:
|
||||||
local_file: "{{image_dir}}{{ si }}"
|
file_pull: True
|
||||||
file_system: "bootflash:"
|
file_pull_timeout: 1200
|
||||||
|
remote_file: "{{image_dir}}{{ si }}"
|
||||||
|
remote_scp_server: 192.168.1.1
|
||||||
|
remote_scp_server_user: scp_user
|
||||||
|
remote_scp_server_password: scp_password
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: "{{ ignore_errors_httpapi }}"
|
|
||||||
|
|
||||||
- name: "Copy {{ si }} to bootflash"
|
#- name: "Copy {{ si }} to bootflash"
|
||||||
nxos_file_copy:
|
# expect:
|
||||||
local_file: "{{image_dir}}{{ si }}"
|
# command: "scp {{image_dir}}{{ si }} {{ ansible_ssh_user }}@{{ ansible_ssh_host }}:"
|
||||||
file_system: "bootflash:"
|
# responses:
|
||||||
register: result
|
# (?i)Are you sure you want to continue connecting.*: yes
|
||||||
ignore_errors: "{{ ignore_errors_httpapi }}"
|
# (?i)password: "{{ ansible_ssh_pass }}"
|
||||||
|
# timeout: 1800
|
||||||
|
# register: result
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
msg: "{{ item.key }} {{ item.value }}"
|
msg: "{{ item.key }} {{ item.value }}"
|
||||||
|
@ -29,11 +30,24 @@
|
||||||
|
|
||||||
- name: "Copy {{ ki }} to bootflash"
|
- name: "Copy {{ ki }} to bootflash"
|
||||||
nxos_file_copy:
|
nxos_file_copy:
|
||||||
local_file: "{{image_dir}}/{{ ki }}"
|
file_pull: True
|
||||||
file_system: "bootflash:"
|
file_pull_timeout: 1200
|
||||||
register: result
|
remote_file: "{{image_dir}}{{ ki }}"
|
||||||
|
remote_scp_server: 192.168.1.1
|
||||||
|
remote_scp_server_user: scp_user
|
||||||
|
remote_scp_server_password: scp_password
|
||||||
when: ki is defined
|
when: ki is defined
|
||||||
ignore_errors: "{{ ignore_errors_httpapi }}"
|
register: result
|
||||||
|
|
||||||
|
#- name: "Copy {{ ki }} to bootflash"
|
||||||
|
# expect:
|
||||||
|
# command: "scp {{image_dir}}{{ ki }} {{ ansible_ssh_user }}@{{ ansible_ssh_host }}:"
|
||||||
|
# responses:
|
||||||
|
# (?i)Are you sure you want to continue connecting.*: yes
|
||||||
|
# (?i)password: "{{ ansible_ssh_pass }}"
|
||||||
|
# timeout: 1800
|
||||||
|
# when: ki is defined
|
||||||
|
# register: result
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
msg: "{{ item.key }} {{ item.value }}"
|
msg: "{{ item.key }} {{ item.value }}"
|
||||||
|
|
|
@ -6,5 +6,6 @@
|
||||||
- allow delete boot-image
|
- allow delete boot-image
|
||||||
- "delete {{ item }}"
|
- "delete {{ item }}"
|
||||||
match: none
|
match: none
|
||||||
|
provider: "{{ connection }}"
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
with_items: "{{ delete_image_list }}"
|
with_items: "{{ delete_image_list }}"
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
---
|
|
||||||
- name: "Delete Files To Make Room On Bootflash using provider"
|
|
||||||
nxos_config: &remove_file
|
|
||||||
lines:
|
|
||||||
- terminal dont-ask
|
|
||||||
- allow delete boot-image
|
|
||||||
- "delete {{ item }}"
|
|
||||||
match: none
|
|
||||||
provider: "{{ connection }}"
|
|
||||||
ignore_errors: yes
|
|
||||||
with_items: "{{ delete_image_list }}"
|
|
|
@ -3,3 +3,4 @@
|
||||||
nxos_feature:
|
nxos_feature:
|
||||||
feature: scp-server
|
feature: scp-server
|
||||||
state: enabled
|
state: enabled
|
||||||
|
provider: "{{ connection }}"
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
- name: "Setup - Turn on feature scp-server using provider"
|
|
||||||
nxos_feature:
|
|
||||||
feature: scp-server
|
|
||||||
state: enabled
|
|
||||||
provider: "{{ connection }}"
|
|
|
@ -1,15 +1,15 @@
|
||||||
---
|
---
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/delete_files.yaml
|
- include: targets/nxos_install_os/tasks/upgrade/delete_files.yaml
|
||||||
when: delete_image_list is defined
|
when: delete_files
|
||||||
|
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml
|
- include: "targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml ansible_connection=network_cli connection={{ cli }}"
|
||||||
when: copy_images is defined
|
when: copy_images
|
||||||
|
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml
|
- include: targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml
|
||||||
when: ki is defined and combined is undefined
|
when: ki is defined
|
||||||
|
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/install_system.yaml
|
- include: targets/nxos_install_os/tasks/upgrade/install_system.yaml
|
||||||
when: combined is defined
|
when: ki is undefined
|
||||||
|
|
||||||
# Only needed when - meta: reset_connection does not work. Fixed in 2.6
|
# Only needed when - meta: reset_connection does not work. Fixed in 2.6
|
||||||
#- include: targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml
|
#- include: targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml
|
||||||
|
@ -19,6 +19,7 @@
|
||||||
- name: "Check installed OS for newly installed version {{ tv }}"
|
- name: "Check installed OS for newly installed version {{ tv }}"
|
||||||
nxos_command:
|
nxos_command:
|
||||||
commands: ['show version | json']
|
commands: ['show version | json']
|
||||||
|
provider: "{{ connection }}"
|
||||||
register: output
|
register: output
|
||||||
|
|
||||||
- debug: msg="Version detected {{ output['stdout_lines'][0]['kickstart_ver_str'] }}"
|
- debug: msg="Version detected {{ output['stdout_lines'][0]['kickstart_ver_str'] }}"
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
---
|
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/delete_files_provider.yaml
|
|
||||||
when: delete_image_list is defined
|
|
||||||
|
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml
|
|
||||||
when: copy_images is defined
|
|
||||||
|
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/install_with_kick_provider.yaml
|
|
||||||
when: ki is defined and combined is undefined
|
|
||||||
|
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/install_system_provider.yaml
|
|
||||||
when: combined is defined
|
|
||||||
|
|
||||||
# Only needed when - meta: reset_connection does not work. Fixed in 2.6
|
|
||||||
#- include: targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml
|
|
||||||
|
|
||||||
- meta: reset_connection
|
|
||||||
|
|
||||||
- name: "Check installed OS for newly installed version {{ tv }}"
|
|
||||||
nxos_command:
|
|
||||||
commands: ['show version | json']
|
|
||||||
provider: "{{ connection }}"
|
|
||||||
register: output
|
|
||||||
|
|
||||||
- debug: msg="Version detected {{ output['stdout_lines'][0]['kickstart_ver_str'] }}"
|
|
|
@ -4,9 +4,31 @@
|
||||||
nxos_install_os:
|
nxos_install_os:
|
||||||
system_image_file: "{{ si }}"
|
system_image_file: "{{ si }}"
|
||||||
issu: "{{ issu }}"
|
issu: "{{ issu }}"
|
||||||
|
provider: "{{ connection }}"
|
||||||
register: result
|
register: result
|
||||||
|
when: not force
|
||||||
|
|
||||||
|
- name: "Set OS image {{ si }} boot pointers"
|
||||||
|
nxos_config:
|
||||||
|
lines:
|
||||||
|
- no boot nxos
|
||||||
|
- no boot kickstart
|
||||||
|
- no boot system
|
||||||
|
- "boot nxos bootflash:{{ si }}"
|
||||||
|
- copy run start
|
||||||
|
match: line
|
||||||
|
provider: "{{ connection }}"
|
||||||
|
when: force
|
||||||
|
|
||||||
|
- name: "Boot image {{ si }} using reload"
|
||||||
|
nxos_command:
|
||||||
|
commands: 'terminal dont-ask ; reload'
|
||||||
|
provider: "{{ connection }}"
|
||||||
|
ignore_errors: yes
|
||||||
|
when: force
|
||||||
|
|
||||||
- debug: msg=" {{ result['install_state'] }}"
|
- debug: msg=" {{ result['install_state'] }}"
|
||||||
|
when: not force
|
||||||
|
|
||||||
- name: Wait for device to come back up with new image
|
- name: Wait for device to come back up with new image
|
||||||
wait_for:
|
wait_for:
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
---
|
|
||||||
- name: "Install OS image {{ si }} using provider"
|
|
||||||
check_mode: "{{ checkmode }}"
|
|
||||||
nxos_install_os:
|
|
||||||
system_image_file: "{{ si }}"
|
|
||||||
issu: "{{ issu }}"
|
|
||||||
provider: "{{ connection }}"
|
|
||||||
register: result
|
|
||||||
|
|
||||||
- debug: msg=" {{ result['install_state'] }}"
|
|
||||||
|
|
||||||
- name: Wait for device to come back up with new image
|
|
||||||
wait_for:
|
|
||||||
port: 22
|
|
||||||
state: started
|
|
||||||
timeout: 500
|
|
||||||
delay: 60
|
|
||||||
host: "{{ inventory_hostname }}"
|
|
||||||
when: result.changed and not checkmode
|
|
||||||
|
|
||||||
- debug: msg='Wait 5 mins to allow system to stabilize'
|
|
||||||
when: result.changed and not checkmode
|
|
||||||
- pause:
|
|
||||||
seconds: 300
|
|
||||||
when: result.changed and not checkmode
|
|
|
@ -5,9 +5,31 @@
|
||||||
system_image_file: "{{ si }}"
|
system_image_file: "{{ si }}"
|
||||||
kickstart_image_file: "{{ ki }}"
|
kickstart_image_file: "{{ ki }}"
|
||||||
issu: "{{ issu }}"
|
issu: "{{ issu }}"
|
||||||
|
provider: "{{ connection }}"
|
||||||
register: result
|
register: result
|
||||||
|
when: not force
|
||||||
|
|
||||||
|
- name: "Set OS image {{ si }} boot pointers"
|
||||||
|
nxos_config:
|
||||||
|
lines:
|
||||||
|
- no boot kickstart
|
||||||
|
- no boot system
|
||||||
|
- "boot kickstart bootflash:{{ ki }}"
|
||||||
|
- "boot system bootflash:{{ si }}"
|
||||||
|
- copy run start
|
||||||
|
match: line
|
||||||
|
provider: "{{ connection }}"
|
||||||
|
when: force
|
||||||
|
|
||||||
|
- name: "Boot image {{ si }} using reload"
|
||||||
|
nxos_command:
|
||||||
|
commands: 'terminal dont-ask ; reload'
|
||||||
|
provider: "{{ connection }}"
|
||||||
|
ignore_errors: yes
|
||||||
|
when: force
|
||||||
|
|
||||||
- debug: msg=" {{ result['install_state'] }}"
|
- debug: msg=" {{ result['install_state'] }}"
|
||||||
|
when: not force
|
||||||
|
|
||||||
- name: Wait for device to come back up with new image
|
- name: Wait for device to come back up with new image
|
||||||
wait_for:
|
wait_for:
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
---
|
|
||||||
- name: "Install OS image {{ si }} using provider"
|
|
||||||
check_mode: "{{ checkmode }}"
|
|
||||||
nxos_install_os:
|
|
||||||
system_image_file: "{{ si }}"
|
|
||||||
kickstart_image_file: "{{ ki }}"
|
|
||||||
issu: "{{ issu }}"
|
|
||||||
provider: "{{ connection }}"
|
|
||||||
register: result
|
|
||||||
|
|
||||||
- debug: msg=" {{ result['install_state'] }}"
|
|
||||||
|
|
||||||
- name: Wait for device to come back up with new image
|
|
||||||
wait_for:
|
|
||||||
port: 22
|
|
||||||
state: started
|
|
||||||
timeout: 500
|
|
||||||
delay: 60
|
|
||||||
host: "{{ inventory_hostname }}"
|
|
||||||
when: result.changed and not checkmode
|
|
||||||
|
|
||||||
- debug: msg='Wait 5 mins to allow system to stabilize'
|
|
||||||
when: result.changed and not checkmode
|
|
||||||
- pause:
|
|
||||||
seconds: 300
|
|
||||||
when: result.changed and not checkmode
|
|
|
@ -4,7 +4,3 @@
|
||||||
- meta: end_play
|
- meta: end_play
|
||||||
|
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/install_os.yaml
|
- include: targets/nxos_install_os/tasks/upgrade/install_os.yaml
|
||||||
when: connection is not defined
|
|
||||||
|
|
||||||
- include: targets/nxos_install_os/tasks/upgrade/install_os_provider.yaml
|
|
||||||
when: connection is defined
|
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
---
|
|
||||||
- name: "Reload to upgrade to OS image {{ si }}"
|
|
||||||
nxos_config:
|
|
||||||
lines:
|
|
||||||
- terminal dont-ask
|
|
||||||
- no boot nxos
|
|
||||||
- "boot nxos bootflash:{{ si }}"
|
|
||||||
- reload
|
|
||||||
match: none
|
|
||||||
ignore_errors: yes
|
|
||||||
|
|
||||||
- name: Wait for device to come back up with new image
|
|
||||||
wait_for:
|
|
||||||
port: 22
|
|
||||||
state: started
|
|
||||||
timeout: 500
|
|
||||||
delay: 60
|
|
||||||
host: "{{ inventory_hostname }}"
|
|
||||||
|
|
||||||
- debug: msg='Wait 5 mins to allow system to stabilize'
|
|
||||||
- pause:
|
|
||||||
seconds: 300
|
|
|
@ -1,23 +0,0 @@
|
||||||
---
|
|
||||||
- name: "Reload to upgrade to OS image {{ si }} using provider"
|
|
||||||
nxos_config:
|
|
||||||
lines:
|
|
||||||
- terminal dont-ask
|
|
||||||
- no boot nxos
|
|
||||||
- "boot nxos bootflash:{{ si }}"
|
|
||||||
- reload
|
|
||||||
match: none
|
|
||||||
provider: "{{ connection }}"
|
|
||||||
ignore_errors: yes
|
|
||||||
|
|
||||||
- name: Wait for device to come back up with new image
|
|
||||||
wait_for:
|
|
||||||
port: 22
|
|
||||||
state: started
|
|
||||||
timeout: 500
|
|
||||||
delay: 60
|
|
||||||
host: "{{ inventory_hostname }}"
|
|
||||||
|
|
||||||
- debug: msg='Wait 5 mins to allow system to stabilize'
|
|
||||||
- pause:
|
|
||||||
seconds: 300
|
|
|
@ -3,12 +3,16 @@
|
||||||
- debug: msg="Using provider={{ connection.transport }}"
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
when: connection is defined
|
when: connection is defined
|
||||||
|
|
||||||
- set_fact: checkmode='no'
|
|
||||||
- set_fact: issu='desired'
|
|
||||||
- set_fact: copy_images='yes'
|
|
||||||
|
|
||||||
- set_fact: image_dir='/Users/mwiebe/Projects/nxos_ansible/images/'
|
- set_fact: image_dir='/Users/mwiebe/Projects/nxos_ansible/images/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='desired'
|
||||||
|
- set_fact: copy_images=True
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=True
|
||||||
- set_fact:
|
- set_fact:
|
||||||
delete_image_list:
|
delete_image_list:
|
||||||
- nxos.7.0.3.I7.2.bin
|
- nxos.7.0.3.I7.2.bin
|
||||||
|
@ -38,18 +42,17 @@
|
||||||
# Upgrade to 6.0(2)U6(3a) #
|
# Upgrade to 6.0(2)U6(3a) #
|
||||||
#---------------------------------------------------------#
|
#---------------------------------------------------------#
|
||||||
|
|
||||||
- set_fact: si='n3000-uk9.6.0.2.U6.3a.bin'
|
- set_fact: si='n3000-s2-dk9.8.0.1.bin'
|
||||||
- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.3a.bin'
|
- set_fact: ki='n3000-s2-kickstart.8.0.1.bin'
|
||||||
|
|
||||||
- name: Upgrade to U6.3a
|
- name: Upgrade to U6.3a
|
||||||
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
||||||
|
|
||||||
#---------------------------------------------------------#
|
#---------------------------------------------------------#
|
||||||
# Upgrade to 7.0(3)I7(3) #
|
# Upgrade to 7.0(3)I7(2) #
|
||||||
#---------------------------------------------------------#
|
#---------------------------------------------------------#
|
||||||
|
|
||||||
- set_fact: si='nxos.7.0.3.I7.2.bin'
|
- set_fact: si='nxos.7.0.3.I7.2.bin'
|
||||||
- set_fact: combined='true'
|
|
||||||
|
|
||||||
- name: Upgrade to 7.0.3.I7.2
|
- name: Upgrade to 7.0.3.I7.2
|
||||||
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/greensboro/REL_7_0_3_I7_4/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='no'
|
||||||
|
- set_fact: copy_images=True
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=True
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- nxos*.bin
|
||||||
|
- n3000*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='nxos.7.0.3.I7.4.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N3172 Device to Greensboro Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602U6_1/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='desired'
|
||||||
|
- set_fact: copy_images=True
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=True
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- n3000*.bin
|
||||||
|
- nxos*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='n3000-uk9.6.0.2.U6.1a.bin'
|
||||||
|
- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.1a.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N3500 Device to U61a Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602U6_2/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='no'
|
||||||
|
- set_fact: copy_images=True
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=True
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- n3000*.bin
|
||||||
|
- nxos*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='n3000-uk9.6.0.2.U6.2a.bin'
|
||||||
|
- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.2a.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N3500 Device to U62a Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602U6_3/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='desired'
|
||||||
|
- set_fact: copy_images=True
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=True
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- n3000*.bin
|
||||||
|
- nxos*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='n3000-uk9.6.0.2.U6.3a.bin'
|
||||||
|
- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.3a.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N3500 Device to U63a Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602A8_8/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='desired'
|
||||||
|
- set_fact: copy_images=True
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=True
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- n3000*.bin
|
||||||
|
- n3500*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='n3500-uk9.6.0.2.A8.8.bin'
|
||||||
|
- set_fact: ki='n3500-uk9-kickstart.6.0.2.A8.8.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N3500 Device to A8_8 Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/greensboro/REL_7_0_3_I7_4/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='desired'
|
||||||
|
- set_fact: copy_images=False
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=False
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- nxos*.bin
|
||||||
|
- n3500*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='nxos.7.0.3.I7.4.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N3500 Device to Greensboro Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/730_N11/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='no'
|
||||||
|
- set_fact: copy_images=True
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=True
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- n6000*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='n6000-uk9.7.3.0.N1.1.bin'
|
||||||
|
- set_fact: ki='n6000-uk9-kickstart.7.3.0.N1.1.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N5k Device to 7.3(0)N1(1) Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/733_N11/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='no'
|
||||||
|
- set_fact: copy_images=False
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=False
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- n6000*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='n6000-uk9.7.3.3.N1.1.bin'
|
||||||
|
- set_fact: ki='n6000-uk9-kickstart.7.3.3.N1.1.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N5k Device to 7.3(3)N1(1) Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/atherton/REL_8_0_1/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='no'
|
||||||
|
- set_fact: copy_images=True
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=True
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- n7000*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='n7000-s2-dk9.8.0.1.bin'
|
||||||
|
- set_fact: ki='n7000-s2-kickstart.8.0.1.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N7k Device to Atherton Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/helsinki/REL_7_3_0_D1_1/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='no'
|
||||||
|
- set_fact: copy_images=True
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=True
|
||||||
|
|
||||||
|
- set_fact: delete_files=True
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- n7000*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='n7000-s2-dk9.7.3.0.D1.1.bin'
|
||||||
|
- set_fact: ki='n7000-s2-kickstart.7.3.0.D1.1.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N7k Device to Helsinki Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
|
@ -0,0 +1,41 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/greensboro/REL_7_0_3_I7_4/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='yes'
|
||||||
|
- set_fact: copy_images=False
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=False
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- nxos*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Remove incompatible features #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- name: Unconfigure features that will conflict with upgrade
|
||||||
|
nxos_config:
|
||||||
|
lines:
|
||||||
|
- terminal dont-ask
|
||||||
|
- no feature nv overlay
|
||||||
|
- no nxapi ssl protocols
|
||||||
|
- no nxapi ssl ciphers weak
|
||||||
|
match: none
|
||||||
|
provider: "{{ connection }}"
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='nxos.7.0.3.I7.4.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N9k Device to Greensboro Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
|
@ -0,0 +1,39 @@
|
||||||
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
|
||||||
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
|
when: connection is defined
|
||||||
|
|
||||||
|
# Set directory pointer to software images
|
||||||
|
- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/hamilton/REL_9_2_1/'
|
||||||
|
|
||||||
|
- set_fact: checkmode='no'
|
||||||
|
- set_fact: issu='desired'
|
||||||
|
- set_fact: copy_images=False
|
||||||
|
|
||||||
|
# Set boot pointers and reload
|
||||||
|
- set_fact: force=False
|
||||||
|
|
||||||
|
- set_fact: delete_files=False
|
||||||
|
- set_fact:
|
||||||
|
delete_image_list:
|
||||||
|
- nxos*.bin
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Remove incompatible features #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- name: Unconfigure features that will conflict with upgrade
|
||||||
|
nxos_config:
|
||||||
|
lines:
|
||||||
|
- terminal dont-ask
|
||||||
|
- no feature ngmvpn
|
||||||
|
match: none
|
||||||
|
provider: "{{ connection }}"
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
# Upgrade Device #
|
||||||
|
#---------------------------------------------------------#
|
||||||
|
- set_fact: si='nxos.9.2.1.bin'
|
||||||
|
|
||||||
|
- name: Upgrade N9k Device to Hamilton Release Image
|
||||||
|
include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
|
Loading…
Reference in a new issue