diff --git a/roles/bashrc/tasks/main.yml b/roles/bashrc/tasks/main.yml index c8ebb5a..c4e3f5d 100644 --- a/roles/bashrc/tasks/main.yml +++ b/roles/bashrc/tasks/main.yml @@ -1,9 +1,9 @@ --- - name: Deploy .bashrc - copy: + ansible.builtin.copy: src : files/bashrc dest : /root/.bashrc - mode : 0640 + mode : "0640" ... diff --git a/roles/etc_hosts/defaults/main.yml b/roles/etc_hosts/defaults/main.yml index 88fa1a7..0b02ea7 100644 --- a/roles/etc_hosts/defaults/main.yml +++ b/roles/etc_hosts/defaults/main.yml @@ -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 ... diff --git a/roles/etc_hosts/tasks/main.yml b/roles/etc_hosts/tasks/main.yml index a6b8e47..de63508 100644 --- a/roles/etc_hosts/tasks/main.yml +++ b/roles/etc_hosts/tasks/main.yml @@ -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" ... diff --git a/roles/etc_hosts/templates/.keep b/roles/etc_hosts/templates/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/roles/etc_hosts/templates/etc_hosts.j2 b/roles/etc_hosts/templates/etc_hosts.j2 index e1e1d26..4bcaeff 100644 --- a/roles/etc_hosts/templates/etc_hosts.j2 +++ b/roles/etc_hosts/templates/etc_hosts.j2 @@ -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 %}