Comments (5)
what does it mean "when the profile is not completely defined in the profile"? Can you provide an example of such a profile, as a snippet of the network_connections variable?
when the profile is not completely defined in the profile and does not exist on the target system.
What will happen when the profile is not completely defined, but it DOES exist on the target system?
from network.
what does it mean "when the profile is not completely defined in the profile"? Can you provide an example of such a profile, as a snippet of the network_connections variable?
It is basically this, just a name and the state:
https://github.com/linux-system-roles/network/blob/master/tests/down-profile.yml
What will happen when the profile is not completely defined, but it DOES exist on the target system?
Then it will now down the profile using ifdown $profile
or via Network Manager because all the required information is available.
When interface_name
is defined, we can also call ip link set dev $interface state down
when the profile is not found but the interface exists to allow to down interfaces for which the profile was already set to absent
.
from network.
Currently the role fails when ask to set a profile to
down
when the profile is not completely defined in the profile and does not exist on the target system. One could argue that a profile isdown
when it does not exist on the system. However, one could also argue that the role should report this as an error in case there is a typo.
What about reporting an error only if the profile does not exist AND the corresponding interface does not exist either? (By "corresponding interface" I mean the interface determined in the standard way - i.e. match on interface_name
(with the default being name
) or mac
.)
If there is a corresponding interface, then presumably it was not a typo.
from network.
Thinking more about it, I don't think we should worry about typos. Not being able to detect typos in some cases is the price to pay for idempotency, which is one of the key concepts in Ansible. The file module does not report an error with state=absent either, even if the file is not there and the name given could be a typo. This is by design; contrast with the rm command, which can detect typos in this way, but is not idempotent.
from network.
Thinking more about it, I don't think we should worry about typos. Not being able to detect typos in some cases is the price to pay for idempotency, which is one of the key concepts in Ansible. The file module does not report an error with state=absent either, even if the file is not there and the name given could be a typo. This is by design; contrast with the rm command, which can detect typos in this way, but is not idempotent.
Ok, let's close this and follow up in #188
from network.
Related Issues (20)
- Feature request: support adding tun devices HOT 14
- Routing rules improvement HOT 6
- Eliminate non-inclusive language HOT 5
- Address CodeQL warnings HOT 4
- Network override HOT 1
- add 'auto-dns' option also to network_connections HOT 6
- How to keep existing profile name HOT 3
- Verify and document no-aaaa DNS option HOT 2
- network_state should not change IPv6 state when not configured HOT 2
- Question Changing the IP of the remote host HOT 3
- ipv4.dns-data: unknown property (7) HOT 6
- RFE: Add support for DNS caching HOT 3
- WireGuard support HOT 1
- Rename the task `name: Check if rpm ostree system - cannot test` into a meaningful name explaining the reason for skipping test HOT 2
- Add support for veth pair HOT 3
- Add support for scope and src route options HOT 4
- not idempotent HOT 4
- Need further output from "check" mode HOT 7
- VRF Support HOT 2
- EL-7 tests fails because there is no EPEL-7 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 network.