Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connections[0].ip: property is not allowed for state 'up' and persistent_state 'present' #85

Closed
silanea opened this issue Sep 7, 2018 · 3 comments

Comments

@silanea
Copy link

silanea commented Sep 7, 2018

Hoping that I did not misunderstand a fundamental aspect of how this role works, I encountered the following issue:

TASK [network : Configure networking connection profiles] *********************************************************************************************************************************************************************************** fatal: [redacted]: FAILED! => {"changed": false, "msg": "fatal error: configuration error: connections[0].ip: property is not allowed for state 'up' and persistent_state 'present'"}

Relevant variables:

network_connections:
  - name: "ens3"
    state: up
    ip:
      address:
        - x.x.x.x/32
        - x:x:x::/64

Incidentally the specified IPs match the current system configuration, so no actual changes should be taking place anyway but it still fails. If you need any other info or logs from the system, please let me know.

Fedora 28 Server, current master (a10e72b)

@tyll
Copy link
Member

tyll commented Sep 7, 2018

Thank you for the report. Currently the role requires the type to be specified to support setting the IP addresses, it works when you add type: ethernet to the settings:

- hosts: all
  vars:
    network_connections:
    - name: eth2
      state: up
      type: ethernet
      ip:
        address:
          - 192.0.2.28/32
          - 2001:db8:23:32::/64
  roles:
    - linux-system-roles.network

The error message could be improved, though. Making type: ethernet the default bears the risk of breaking configurations when the specified device is a bond device or something else.

@silanea
Copy link
Author

silanea commented Sep 7, 2018

Thank you for your rapid response. The change you suggested did indeed keep the error message from popping up. Unfortunately, whatever happened next caused me to lose connectivity to the server. I'll dig in and fix that; if the issue is unrelated to this role, then I will close the issue, otherwise I'll add relevant logs.

@silanea
Copy link
Author

silanea commented Sep 7, 2018

All is well. I was dumb enough to forget to specify gateways.

@silanea silanea closed this as completed Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants