Commit 9dc8f2e14bd7b2c132b79d4d6d43f97ead531037
1 parent
abe67ca8
Exists in
master
and in
39 other branches
Not trying to install puppet if it's already there
Showing
1 changed file
with
11 additions
and
9 deletions
Show diff stats
puppet/bootstrap.py
| ... | ... | @@ -174,17 +174,19 @@ def main(): |
| 174 | 174 | distro, release = get_release_name() |
| 175 | 175 | print('Distro %s, release %s' % (distro, release)) |
| 176 | 176 | |
| 177 | - # Add repository | |
| 178 | - add_puppet_repository() | |
| 177 | + if not os.path.exists('/usr/bin/puppet'): | |
| 178 | + | |
| 179 | + # Add repository | |
| 180 | + add_puppet_repository() | |
| 179 | 181 | |
| 180 | - # Install Puppet | |
| 181 | - if isubuntu(distro): | |
| 182 | - distro_update() | |
| 182 | + # Install Puppet | |
| 183 | + if isubuntu(distro): | |
| 184 | + distro_update() | |
| 183 | 185 | |
| 184 | - result = package_install('puppet') | |
| 185 | - if result != 0: | |
| 186 | - print('Failed installing puppet') | |
| 187 | - exit(result) | |
| 186 | + result = package_install('puppet') | |
| 187 | + if result != 0: | |
| 188 | + print('Failed installing puppet') | |
| 189 | + exit(result) | |
| 188 | 190 | |
| 189 | 191 | if os.path.isfile('/vagrant/puppet/hiera.yaml'): |
| 190 | 192 | copyfile('/vagrant/puppet/hiera.yaml', '/etc/puppet/hiera.yaml') | ... | ... |