Initial release version to AAP #5
@ -1,9 +1,9 @@
|
||||
---
|
||||
- name: Deploy .bashrc
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src : files/bashrc
|
||||
dest : /root/.bashrc
|
||||
mode : 0640
|
||||
mode : "0640"
|
||||
|
||||
|
||||
...
|
||||
|
@ -1,15 +1,15 @@
|
||||
---
|
||||
__project_author : Chris Hammer
|
||||
__project_email : chris@thezengarden.net
|
||||
__project_repo : https://github.com/jchristianh-ansible-collections/baseos
|
||||
etc_hosts_project_author : Chris Hammer
|
||||
etc_hosts_project_email : chris@thezengarden.net
|
||||
etc_hosts_project_repo : https://github.com/jchristianh-ansible-collections/baseos
|
||||
|
||||
|
||||
__template_header : The Zen Garden
|
||||
etc_hosts_template_header : The Zen Garden
|
||||
|
||||
|
||||
__etc_hosts_file : /etc/hosts
|
||||
__etc_hosts_version : 1.0.0
|
||||
__etc_hosts_revision : 22314
|
||||
etc_hosts_etc_hosts_file : /etc/hosts
|
||||
etc_hosts_etc_hosts_version : 1.0.1
|
||||
etc_hosts_etc_hosts_revision : 231216
|
||||
|
||||
|
||||
...
|
||||
|
@ -1,16 +1,16 @@
|
||||
---
|
||||
- name: Set etc_hosts_file if running in Docker
|
||||
- name: Set etc_hosts_etc_hosts_file if running in Docker
|
||||
set_fact:
|
||||
__etc_hosts_file: "{{ __etc_hosts_file }}.docker"
|
||||
etc_hosts_etc_hosts_file: "{{ etc_hosts_etc_hosts_file }}.docker"
|
||||
when:
|
||||
- ansible_virtualization_type | regex_search("docker|podman|container")
|
||||
|
||||
|
||||
- name: Deploy {{ __etc_hosts_file }}
|
||||
- name: Deploy {{ etc_hosts_etc_hosts_file }}
|
||||
template:
|
||||
src: templates/etc_hosts.j2
|
||||
dest: "{{ __etc_hosts_file }}"
|
||||
mode: 0644
|
||||
dest: "{{ etc_hosts_etc_hosts_file }}"
|
||||
mode: "0644"
|
||||
|
||||
|
||||
...
|
||||
|
@ -1,11 +1,11 @@
|
||||
###############################################
|
||||
# {{ __template_header }}
|
||||
# {{ etc_hosts_template_header }}
|
||||
###############################################
|
||||
#
|
||||
# Configuration : {{ __etc_hosts_file }}
|
||||
# Template Version : {{ __etc_hosts_version}}-{{ __etc_hosts_revision }}
|
||||
# Configuration : {{ etc_hosts_etc_hosts_file }}
|
||||
# Template Version : {{ etc_hosts_etc_hosts_version }}-{{ etc_hosts_etc_hosts_revision }}
|
||||
#
|
||||
# {{ __project_author }} ({{ __project_email }})
|
||||
# {{ etc_hosts_project_author }} ({{ etc_hosts_project_email }})
|
||||
###############################################
|
||||
|
||||
|
||||
@ -17,13 +17,13 @@
|
||||
|
||||
# OUR PERSONAL INFO
|
||||
#############################################
|
||||
{{ ansible_default_ipv4.address | default('127.0.0.1') }} {{ ansible_fqdn }} {{ ansible_hostname }} {{ inventory_hostname }}
|
||||
{{ ansible_default_ipv4.address | default('127.0.0.1') }} {{ ansible_fqdn }} {{ ansible_hostname }} {{ inventory_hostname }}
|
||||
|
||||
|
||||
{% if custom_hosts is defined and custom_hosts != '' %}
|
||||
{% if etc_hosts_custom_hosts is defined and etc_hosts_custom_hosts != '' %}
|
||||
# CUSTOM HOSTS:
|
||||
#############################################
|
||||
{% for item in custom_hosts %}
|
||||
{% for item in etc_hosts_custom_hosts %}
|
||||
{{ item }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user