Ansible-lint compliance for roles/etc_hosts, roles/hostname, and roles/motd
Some checks failed
continuous-integration/drone/push Build is failing
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-centos9) (push) Failing after 20s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-debian11) (push) Failing after 14s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-debian12) (push) Failing after 12s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-fedora39) (push) Failing after 14s
Some checks failed
continuous-integration/drone/push Build is failing
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-centos9) (push) Failing after 20s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-debian11) (push) Failing after 14s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-debian12) (push) Failing after 12s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-fedora39) (push) Failing after 14s
This commit is contained in:
@ -1,16 +1,5 @@
|
||||
---
|
||||
__project_author : Chris Hammer
|
||||
__project_email : chris@thezengarden.net
|
||||
__project_repo : https://github.com/jchristianh-ansible-collections/baseos
|
||||
|
||||
|
||||
__template_header : The Zen Garden
|
||||
|
||||
|
||||
__motd_file : /etc/motd
|
||||
__motd_file_docker : /etc/motd
|
||||
__motd_version : 1.0.0
|
||||
__motd_revision : 22318
|
||||
motd_motd_file : /etc/motd
|
||||
|
||||
|
||||
...
|
||||
|
@ -1,27 +1,27 @@
|
||||
---
|
||||
- name: Set host IP address or set a default
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
host_ip : "{{ ansible_default_ipv4.address | default('127.0.0.1') }}"
|
||||
|
||||
|
||||
- name: Install Perl if needed
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name : perl
|
||||
state : present
|
||||
|
||||
|
||||
- name: Get system uptime from script
|
||||
script:
|
||||
ansible.builtin.script:
|
||||
cmd : "scripts/get_uptime.pl {{ ansible_uptime_seconds }}"
|
||||
register : node_uptime
|
||||
changed_when : false
|
||||
|
||||
|
||||
- name: Update MOTD
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src : templates/motd.j2
|
||||
dest : "{{ __motd_file }}"
|
||||
mode : 0644
|
||||
dest : "{{ motd_motd_file }}"
|
||||
mode : "0644"
|
||||
changed_when : false
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user