Comments (8)
I'll verify this today.
from ansible-keepalived.
I didn't change anything on my system, and the service auto starts on boot.
Are you sure it's the ".service" that fixed your issue?
from ansible-keepalived.
Could it be possible that something happened during your first run, and the override to prevent restart was still there?
https://github.com/evrardjp/ansible-keepalived/blob/master/tasks/keepalived_install_apt.yml#L67-L83
from ansible-keepalived.
I think I know what happened here.
I deploy the systemd unit file from keepalived version 1.2.24 in a dedicated task as the current version 1.2.23 does not provide one and I had issues on that in the beginning.
When I use the role naked I get:
root@dnsmasq03:~# systemctl status keepalived
● keepalived.service - LSB: Starts keepalived
● keepalived.service - LSB: Starts keepalived
● keepalived.service - LSB: Starts keepalived
Loaded: loaded (/etc/init.d/keepalived; bad; vendor preset: enabled)
Active: active (running) since Di 2017-01-31 14:25:51 UTC; 9s ago
Docs: man:systemd-sysv-generator(8)
Process: 1037 ExecStart=/etc/init.d/keepalived start (code=exited, status=0/SUCCESS)
Tasks: 18
Memory: 10.7M
CPU: 189ms
CGroup: /system.slice/keepalived.service
├─1072 /usr/sbin/keepalived
├─1073 /usr/sbin/keepalived
├─1074 /usr/sbin/keepalived
....
With this the autostart works indeed.
I do in addition:
- name: GET_URL | fetch systemd unit file not included in 1.2.23 yet
get_url:
url: 'https://raw.githubusercontent.com/acassen/keepalived/v1.2.24/keepalived/keepalived.service'
dest: '/etc/systemd/system/keepalived.service'
checksum: 'md5:da851c03bcedafc35129078ba5046e06'
mode: 0644
notify:
- reload systemd
- restart keepalived
Which leads to:
● keepalived.service - LVS and VRRP High Availability Monitor
Loaded: loaded (/etc/systemd/system/keepalived.service; disabled; vendor preset: enabled)
Active: active (running) since Tue 2017-01-31 13:05:52 UTC; 1h 23min ago
Process: 24278 ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 24279 (keepalived)
Tasks: 3
Memory: 4.1M
CPU: 3min 21.136s
CGroup: /system.slice/keepalived.service
├─24279 /usr/sbin/keepalived -D
├─24281 /usr/sbin/keepalived -D
└─24282 /usr/sbin/keepalived -D
Here it helped me to set keepalived_service_name: "keepalived.service"
in vars/ubuntu-16.04.yml
. But as it is define in vars, I can't override it my group or host_vars Variable precedence.
So the issue is related to the fact that I use a dedicated systemd unit file instead of the default init script.
I assume when keepalived version 1.2.24 is in the PPA more people may face the issue.
from ansible-keepalived.
Sadly I can't reproduce this. I'll spend more time on this this week-end.
from ansible-keepalived.
You are right, it depends on the ppa version.
For safety reasons, I'll use keepalived.service forward. It works for me and for you.
from ansible-keepalived.
Ok the fix is in, I'll bump the version today.
from ansible-keepalived.
Really sorry for all the wait.
You can now fetch the latest version of the role using ansible-galaxy.
from ansible-keepalived.
Related Issues (20)
- Weekly Digest (26 July, 2020 - 2 August, 2020)
- Weekly Digest (2 August, 2020 - 9 August, 2020)
- Role does not find variables when executing unrelated tasks HOT 2
- The role and its CI need modernization HOT 7
- SE Linux blocking loading of scripts as non root user HOT 2
- Unknown keyword 'notify_master_rx_lower_pri' HOT 7
- Use keepalived --config-test flag for keepalived > 2.0.4
- Problem with ansible 2.10.X HOT 7
- Improve visibility for ansible-keepalived on galaxy HOT 1
- (SG1) track script script_process not found, ignoring... HOT 3
- need to pin molecule-docker to version below 1.0 or fix CI
- issue in testing with debian 11 aka bullseye HOT 9
- Linting fails since ansible lint is updated HOT 2
- Add more execution granularity / idempotency HOT 14
- how to set unicast mode HOT 5
- opt out of SELinux module compilation HOT 21
- Solution to a mis-configuration of the task "Dropping the tracking scripts" that should save you hours of debugging HOT 3
- Identical configuration does not work on ubuntu 22.04 while 20.04 works fine HOT 2
- Fix CI HOT 1
- New release HOT 4
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 ansible-keepalived.