Merge "Remove old repos from compute on preupgrade stage"
This commit is contained in:
commit
64177e3a87
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import yaml
|
||||
import sys
|
||||
|
||||
target_file = sys.argv[1]
|
||||
section = sys.argv[2]
|
||||
subsection = sys.argv[3]
|
||||
|
||||
try:
|
||||
with open(target_file,'r+') as f:
|
||||
data = yaml.load(f)
|
||||
del data[section][subsection]
|
||||
|
||||
with open(target_file,'w+') as f:
|
||||
yaml.dump(data,f,default_flow_style=False)
|
||||
except KeyError as e:
|
||||
print "Failed to find key: {0}".format(e)
|
|
@ -56,7 +56,7 @@
|
|||
type: puppet
|
||||
version: 2.1.0
|
||||
groups: [compute]
|
||||
requires: [cleanup_existing_repos, rsync_latest_puppet, override_repos_in_hiera]
|
||||
requires: [cleanup_existing_repos, rsync_latest_puppet, override_repos_in_hiera, remove_hiera_section_repo_setup]
|
||||
required_for: []
|
||||
parameters:
|
||||
puppet_manifest: /etc/fuel/octane/latest_modules/osnailyfacter/modular/fuel_pkgs/setup_repositories.pp
|
||||
|
@ -85,6 +85,16 @@
|
|||
puppet_modules: /etc/fuel/octane/puppet:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
- id: remove_hiera_section_repo_setup
|
||||
type: shell
|
||||
version: 2.1.0
|
||||
groups: [compute]
|
||||
requires: [rsync_octane]
|
||||
required_for: []
|
||||
parameters:
|
||||
cmd: python /etc/fuel/octane/puppet/octane_tasks/files/delete_section.py /etc/astute.yaml repo_setup repos
|
||||
timeout: 60
|
||||
|
||||
- id: remove_hiera_override
|
||||
type: shell
|
||||
version: 2.1.0
|
||||
|
|
Loading…
Reference in New Issue