-1

I am trying to add the following via ansible

---
  - name: Set sysctl for all.accept_ra=0
    sysctl:
      name: net.ipv6.conf.all.accept_ra
      value: 0
      state: present

and it keeps on giving me error:

TASK [ami : Set sysctl for all.accept_ra=0] ***************************************************************************************************
Friday 27 July 2018  17:35:20 +0530 (0:00:12.267)       0:00:12.327 *********** 
fatal: [172.16.14.152]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to reload sysctl: sysctl: cannot stat /proc/sys/net/ipv6/conf/all/accept_ra: No such file or directory\n"}

I have tried quite some variants like

---
  - name: Set sysctl for all.accept_ra=0
    sysctl:
      name: net.ipv6.conf.all.accept_ra
      value: 0
      sysctl_set: yes
      state: present
      sysctl_file: /etc/sysctl.conf
      reload: yes

But the error persists, i am not sure why this keeps going to the path /proc/sys/net/ipv6/conf/all/accept_ra

Any help ?

DeathADDER
  • 83
  • 2
  • 11

1 Answers1

0

The error is clear. For some reason the file does not exist. Is IPv6 enabled?

cannot stat /proc/sys/net/ipv6/conf/all/accept_ra: No such file or directory
Vladimir Botka
  • 58,131
  • 4
  • 32
  • 63