Comments (4)
@tbludau There is some good work that can be done here.. Both in specific tasks and structure.
Many of these tasks where the shell
or command
modules are being used for subscriptions can be remediated using either the redhat_subscription
or yum_repository
modules.
As far as structure we should be able to reduce some of these plays by enforcing a desired state around subscriptions rather than doing checking like so:
- name: Reset all previous repositories
shell: |
subscription-manager repos --disable="*"
num=0
for r in /etc/yum.repos.d/*.repo; do
num=$(( num + $(grep -c "^enabled.*=.*1$" $r) ))
sed -i 's/^enabled.*=.*1/enabled = 0/g' $r
done
echo "$num"
register: repo_cleanup
changed_when: repo_cleanup.stdout > 0
failed_when: repo_cleanup.rc > 0
when: force_repo_reset
We shouldn't need to do loops in tasks for each repo, the yum_repository
module should be able to disable all repos. We should also try to get to a state with this role assuming that we either want to force a repo reset every time or not before this task.
If there are instances where the answer is 'it depends' we should try to be more selective in resolving repo conflicts
Lastly, I think we can restructure the suggest roles into either 'self-configured' or 'subscription-based'. We should be able to perform a couple of tasks based on wether a Sat 6 URL var is present or not, then proceed as normal.
Thoughts?
from ansible-hana-examples.
@tbludau I think we can close this task -- there is a lot of cleanup to be done in issue #13 so I can resolve some of these.
from ansible-hana-examples.
@tbludau question.. are we setting a strict level on ansible version? There's currently a new rhsm_repository module in the development stream for ansible 2.5 that might clean up some of this too.
from ansible-hana-examples.
hey @kyleabenson thanks for your input and sorry for my delayed response. as you descibed we can close this case, because it should not be part of the ansible deployment and brings a lot of erros in aws and azure environments.
from ansible-hana-examples.
Related Issues (14)
- base-host-setup reorg is needed HOT 1
- preconfigure - better document tasks HOT 2
- preconfigure HOT 1
- service firewalld disable failed when firewall is not installed HOT 1
- Build up easy Example-Usage
- Create automatic load of SHINE database for testing HOT 1
- Add installation of S/4 HOT 2
- replace unrar with unar from epel HOT 4
- Restructure documentation HOT 4
- preconfigure sap-mount-media HOT 3
- Add new configuration variable to allow additional hdbinst install parameters to be added HOT 1
- Cleanup of system registration in base_host_setup HOT 3
- Consider abstracting paths from deployment.yml HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-hana-examples.