refactor(role): Rename variables to be in line with role name
This commit is contained in:
@@ -2,54 +2,54 @@
|
||||
- name: 'If Arch Linux create dir to Git clone repo for restart detection'
|
||||
when: 'ansible_facts[''os_family''] | lower == ''archlinux'''
|
||||
ansible.builtin.file:
|
||||
path: '{{ genvm_os_needs_restart_git_clone_dir }}'
|
||||
path: '{{ genma_os_needs_restart_git_clone_dir }}'
|
||||
state: 'directory'
|
||||
|
||||
- name: 'If Arch Linux Git clone repo for restart detection'
|
||||
when: 'ansible_facts[''os_family''] | lower == ''archlinux'''
|
||||
ansible.builtin.git:
|
||||
repo: '{{ genvm_os_needs_restart_git_repo }}'
|
||||
dest: '{{ genvm_os_needs_restart_git_clone_dir }}'
|
||||
version: '{{ genvm_os_needs_restart_git_branch }}'
|
||||
repo: '{{ genma_os_needs_restart_git_repo }}'
|
||||
dest: '{{ genma_os_needs_restart_git_clone_dir }}'
|
||||
version: '{{ genma_os_needs_restart_git_branch }}'
|
||||
|
||||
- name: 'If Arch Linux create symlinks to repo for restart detection'
|
||||
when: 'ansible_facts[''os_family''] | lower == ''archlinux'''
|
||||
loop_control:
|
||||
loop_var: 'genvm_os_needs_restart_symlink'
|
||||
label: 'Create symlink to ''{{ genvm_os_needs_restart_symlink.target | basename }}'''
|
||||
loop_var: 'genma_os_needs_restart_symlink'
|
||||
label: 'Create symlink to ''{{ genma_os_needs_restart_symlink.target | basename }}'''
|
||||
loop:
|
||||
- { target: '{{ genvm_os_needs_restart_git_clone_dir }}/arch-needs-restart.sh', symlink: '/usr/local/bin/arch-needs-restart' }
|
||||
- { target: '{{ genvm_os_needs_restart_git_clone_dir }}/arch-needs-restart.hook', symlink: '/usr/share/libalpm/hooks/arch-needs-restart.hook' }
|
||||
- { target: '{{ genma_os_needs_restart_git_clone_dir }}/arch-needs-restart.sh', symlink: '/usr/local/bin/arch-needs-restart' }
|
||||
- { target: '{{ genma_os_needs_restart_git_clone_dir }}/arch-needs-restart.hook', symlink: '/usr/share/libalpm/hooks/arch-needs-restart.hook' }
|
||||
ansible.builtin.file:
|
||||
src: '{{ genvm_os_needs_restart_symlink.target }}'
|
||||
dest: '{{ genvm_os_needs_restart_symlink.symlink }}'
|
||||
src: '{{ genma_os_needs_restart_symlink.target }}'
|
||||
dest: '{{ genma_os_needs_restart_symlink.symlink }}'
|
||||
state: 'link'
|
||||
force: true
|
||||
|
||||
- name: 'If Arch Linux create dir to Git clone repo for OS auto-upgrades'
|
||||
when: 'ansible_facts[''os_family''] | lower == ''archlinux'''
|
||||
ansible.builtin.file:
|
||||
path: '{{ genvm_os_auto_upgrades_git_clone_dir }}'
|
||||
path: '{{ genma_os_auto_upgrades_git_clone_dir }}'
|
||||
state: 'directory'
|
||||
|
||||
- name: 'If Arch Linux Git clone repo for OS auto-upgrades'
|
||||
when: 'ansible_facts[''os_family''] | lower == ''archlinux'''
|
||||
ansible.builtin.git:
|
||||
repo: '{{ genvm_os_auto_upgrades_git_repo }}'
|
||||
dest: '{{ genvm_os_auto_upgrades_git_clone_dir }}'
|
||||
version: '{{ genvm_os_auto_upgrades_git_branch }}'
|
||||
repo: '{{ genma_os_auto_upgrades_git_repo }}'
|
||||
dest: '{{ genma_os_auto_upgrades_git_clone_dir }}'
|
||||
version: '{{ genma_os_auto_upgrades_git_branch }}'
|
||||
|
||||
- name: 'If Arch Linux copy systemd unit files for OS auto-upgrades to ''/etc/systemd/system'''
|
||||
when: 'ansible_facts[''os_family''] | lower == ''archlinux'''
|
||||
loop_control:
|
||||
loop_var: 'genvm_os_auto_upgrades_unit'
|
||||
label: 'Copy ''{{ genvm_os_auto_upgrades_unit.source | basename }}'' to ''/etc/systemd/system'''
|
||||
loop_var: 'genma_os_auto_upgrades_unit'
|
||||
label: 'Copy ''{{ genma_os_auto_upgrades_unit.source | basename }}'' to ''/etc/systemd/system'''
|
||||
loop:
|
||||
- { source: '{{ genvm_os_auto_upgrades_git_clone_dir }}/arch-linux-update-and-restart.service', target: '/etc/systemd/system/arch-linux-update-and-restart.service' }
|
||||
- { source: '{{ genvm_os_auto_upgrades_git_clone_dir }}/arch-linux-update-and-restart.timer', target: '/etc/systemd/system/arch-linux-update-and-restart.timer' }
|
||||
- { source: '{{ genma_os_auto_upgrades_git_clone_dir }}/arch-linux-update-and-restart.service', target: '/etc/systemd/system/arch-linux-update-and-restart.service' }
|
||||
- { source: '{{ genma_os_auto_upgrades_git_clone_dir }}/arch-linux-update-and-restart.timer', target: '/etc/systemd/system/arch-linux-update-and-restart.timer' }
|
||||
ansible.builtin.copy:
|
||||
src: '{{ genvm_os_auto_upgrades_unit.source }}'
|
||||
dest: '{{ genvm_os_auto_upgrades_unit.target }}'
|
||||
src: '{{ genma_os_auto_upgrades_unit.source }}'
|
||||
dest: '{{ genma_os_auto_upgrades_unit.target }}'
|
||||
remote_src: true
|
||||
notify:
|
||||
- 'Reload systemd unit configs'
|
||||
|
||||
Reference in New Issue
Block a user