Puppet handler fixes
* do not use /tmp/puppet-modules, use /etc/puppet instead. /tmp/ is not persistent and being erased on each reboot. * fix puppet 4.x paths compatibility * pin to openstack-keyston version 5.1.0 instead of stable/juno Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
parent
dc11637125
commit
b183326774
2
.gitignore
vendored
2
.gitignore
vendored
@ -17,6 +17,8 @@ rs/
|
|||||||
|
|
||||||
solar.log
|
solar.log
|
||||||
x-venv/
|
x-venv/
|
||||||
|
.tmp/
|
||||||
|
modules/
|
||||||
|
|
||||||
celery*.pid
|
celery*.pid
|
||||||
celery*.log
|
celery*.log
|
||||||
|
10
main.yml
10
main.yml
@ -31,16 +31,16 @@
|
|||||||
- apt: name=puppet state=present
|
- apt: name=puppet state=present
|
||||||
- git: repo=https://github.com/CGenie/hiera-redis dest=/root/hiera-redis
|
- git: repo=https://github.com/CGenie/hiera-redis dest=/root/hiera-redis
|
||||||
- shell: gem build hiera-redis.gemspec && gem install hiera-redis-3.0.0.gem chdir=/root/hiera-redis
|
- shell: gem build hiera-redis.gemspec && gem install hiera-redis-3.0.0.gem chdir=/root/hiera-redis
|
||||||
|
- file: path=/etc/puppet/Puppetfile state=touch
|
||||||
- template: src=/vagrant/hiera.yaml dest=/etc/puppet/hiera.yaml
|
- template: src=/vagrant/hiera.yaml dest=/etc/puppet/hiera.yaml
|
||||||
- file: path=/etc/puppet/hieradata state=directory
|
- file: path=/etc/puppet/hieradata state=directory
|
||||||
|
# Make paths puppet 4 compatible
|
||||||
- file: path=/etc/puppetlabs/code/ state=directory
|
- file: path=/etc/puppetlabs/code/ state=directory
|
||||||
- file: src=/etc/puppet/hiera.yaml dest=/etc/puppetlabs/code/hiera.yaml state=link
|
- file: src=/etc/puppet/hiera.yaml dest=/etc/puppetlabs/code/hiera.yaml state=link
|
||||||
|
- file: src=/etc/puppet/hieradata dest=/etc/puppetlabs/code/hieradata state=link
|
||||||
|
- file: src=/etc/puppet/modules dest=/etc/puppetlabs/code/modules state=link
|
||||||
- apt: name=ruby-dev state=present
|
- apt: name=ruby-dev state=present
|
||||||
- shell: gem install librarian-puppet
|
- shell: gem install librarian-puppet --no-ri --no-rdoc
|
||||||
- file: path=/tmp/puppet-modules/modules state=directory
|
|
||||||
- file: path=/tmp/puppet-modules/Puppetfile state=touch
|
|
||||||
- file: path=/etc/puppet/modules state=absent
|
|
||||||
- file: src=/tmp/puppet-modules/modules dest=/etc/puppet/modules state=link
|
|
||||||
|
|
||||||
# Setup additional development tools
|
# Setup additional development tools
|
||||||
- apt: name=vim state=present
|
- apt: name=vim state=present
|
||||||
|
@ -25,7 +25,7 @@ input:
|
|||||||
|
|
||||||
git:
|
git:
|
||||||
schema: {repository: str!, branch: str!}
|
schema: {repository: str!, branch: str!}
|
||||||
value: {repository: 'https://github.com/openstack/puppet-keystone', branch: 'stable/juno'}
|
value: {repository: 'https://github.com/openstack/puppet-keystone', branch: '5.1.0'}
|
||||||
|
|
||||||
# forge:
|
# forge:
|
||||||
# schema: str!
|
# schema: str!
|
||||||
|
@ -98,7 +98,7 @@ class LibrarianPuppet(ResourceSSHMixin):
|
|||||||
|
|
||||||
puppetlabs = self._ssh_command(
|
puppetlabs = self._ssh_command(
|
||||||
self.resource,
|
self.resource,
|
||||||
'sudo', 'cat', '/tmp/puppet-modules/Puppetfile'
|
'sudo', 'cat', '/etc/puppet/Puppetfile'
|
||||||
)
|
)
|
||||||
|
|
||||||
git = self.resource.args['git'].value
|
git = self.resource.args['git'].value
|
||||||
@ -134,14 +134,14 @@ class LibrarianPuppet(ResourceSSHMixin):
|
|||||||
self._scp_command(
|
self._scp_command(
|
||||||
self.resource,
|
self.resource,
|
||||||
'/tmp/Puppetfile',
|
'/tmp/Puppetfile',
|
||||||
'/tmp/puppet-modules/Puppetfile',
|
'/etc/puppet/Puppetfile',
|
||||||
use_sudo=True
|
use_sudo=True
|
||||||
)
|
)
|
||||||
|
|
||||||
self._ssh_command(
|
self._ssh_command(
|
||||||
self.resource,
|
self.resource,
|
||||||
'sudo', 'librarian-puppet', 'install',
|
'sudo', 'librarian-puppet', 'install',
|
||||||
cwd='/tmp/puppet-modules'
|
cwd='/etc/puppet'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user