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

Role fails if nmcli_add_addrs_connection is omitted #12

Open
robled opened this issue Oct 24, 2019 · 1 comment
Open

Role fails if nmcli_add_addrs_connection is omitted #12

robled opened this issue Oct 24, 2019 · 1 comment

Comments

@robled
Copy link
Contributor

robled commented Oct 24, 2019

Provided vars:

    nmcli_add_addrs_interface: p5p1
    nmcli_add_addrs_ipv4:
      - '192.168.168.1/24'

Result:

TASK [oasis_roles.nmcli_add_addrs : Add IPv4 address(es) to ''] ************************************************************************************************************************************************
failed: [example.com] (item=192.168.168.1/24) => changed=true
  ansible_loop_var: item
  cmd:
  - nmcli
  - connection
  - modify
  - ''
  - +ipv4.address
  - 192.168.168.1/24
  delta: '0:00:00.024310'
  end: '2019-10-24 16:17:09.794714'
  item: 192.168.168.1/24
  msg: non-zero return code
  rc: 10
  start: '2019-10-24 16:17:09.770404'
  stderr: 'Error: unknown connection ''''.'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

Defining the nmcli_add_addrs_connection variable resolves the error.

@tehsmyers
Copy link
Contributor

Out of curiousity, what does nmcli -f GENERAL.CONNECTION device show p5p1 say?

At the very least, the command that gets the connection name from and interface doesn't fail if no connection name is found, and it really should, but I'd love to see the nmcli output before jumping to any conclusions about what happened.

@greg-hellings greg-hellings transferred this issue from oasis-roles/nmcli_add_addrs May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants