Here is my target file:
Sonatype Nexus
application-port=8081
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/nexus
nexus-work=/opt/nexuswork
runtime=${bundleBasedir}/nexus/WEB-INF
I know this is an easy way to do this with regex or a simple sed script:
sed -i 's/${bundleBasedir}\/..\/my\/second\/path\/002\/\/nexus/\/myfirstdir001\/g'
However, I would ideally prefer the salt road.
I would like it to look something like this:
Sonatype Nexus
application-port=8081
application-host=0.0.0.0
nexus-webapp=/my/second/path/002/nexus
nexus-webapp-context-path=/nexus
nexus-work=/opt/nexuswork
runtime=/myfirstdir001/nexus/WEB-INF
I still do not understand the meaning of this article.
The Saltstack documentation for salt.states.file.replace looks pretty simple:
http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.replace
Here is what I tried:
/opt/nexus-2.8.0/conf/nexus.properties
file:
- replace
- pattern: '\$\{bundleBasedir\}'
- repl: '/my/second/path/002/nexus'
- pattern: '\$\{bundleBasedir\}\/WEB-INF'
- repl: '/myfirstdir001/'
I could try several status identifiers, but that seems inelegant.
If there is anything else, I get annoyed, please advise!
I would love to find a solution to this.
, , , , , .
, - , :
http://comments.gmane.org/gmane.comp.sysutils.salt.user/15138