diff --git a/roles/sysctl_network/tasks/main.yml b/roles/sysctl_network/tasks/main.yml index c7824dc35aa39d588c8743a802dd290fe5052d7f..ca279fb995bf2d6bf447a32f8510ab0e5baeb9ba 100644 --- a/roles/sysctl_network/tasks/main.yml +++ b/roles/sysctl_network/tasks/main.yml @@ -5,7 +5,7 @@ dest: '/etc/sysctl.d' become: true become_user: root - register: sysctl-network-conf + register: sysctl_network_conf #The sysctl module manages entries in sysctl.conf and setting "reload :yes" performs a /sbin/sysctl -p if the sysctl file is updated. In addition this module requires a name for a specific sysctl variable in order to work. #In this case we need to update the network configuration and making no change to the sysctl.conf file hence the module is not applicable. I am replacing it with a shell module instead. @@ -13,4 +13,4 @@ shell: sysctl -p become: true become_user: root - when: sysctl-network-conf.changed + when: sysctl_network_conf.changed