Ian Wienand 33773388a1 openafs-client: arch fixes
The lookup() happens on the local host, not the remote host.  ergo we
were never using the Debian.aarch64.yaml file in production anyway
(where bridge is x86 so includes only the x86 file).

So clearly it is not necessary; as we have production ARM64 mirrors
using the base file.  This is OK because we build the packages in the
PPA for x86 and arm64.

We can drop openafs_client_apt_repo which isn't used any more.

Follow-on will improve the testing of this.

Change-Id: I298cdfefc813006f7f4218dd37015992556c8498
2020-06-03 12:34:34 +10:00

73 lines
1.6 KiB
YAML

- name: Setup OS specific variable include
include_vars: "{{ lookup('first_found', params) }}"
vars:
params:
files:
- "{{ ansible_distribution }}.{{ ansible_distribution_major_version }}.yaml"
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
paths:
- vars
- name: Check config path defined
fail:
msg: "openafs_client_config_path not defined"
when: not openafs_client_config_path
- name: Create configuration directory
file:
path: '{{ openafs_client_config_path }}'
state: directory
become: yes
- name: Install client base config files
template:
dest: '{{ openafs_client_config_path }}/{{ item }}'
owner: root
group: root
mode: 0644
src: '{{ item }}'
loop:
- afs.conf.client
- CellServDB
become: yes
- name: Install client templated config files
template:
dest: '{{ openafs_client_config_path }}/{{ item }}'
owner: root
group: root
mode: 0644
src: '{{ item }}.j2'
loop:
- cacheinfo
- ThisCell
become: yes
- name: Ensure cache location directory
file:
path: '{{ openafs_client_cache_directory }}'
state: directory
owner: root
group: root
mode: 0700
become: yes
- name: Setup OS specific openafs-client environment
include_tasks: "{{ lookup('first_found', params) }}"
vars:
params:
files:
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- "default.yaml"
paths:
- openafs-client
- name: Ensure openafs-client service running
service:
name: openafs-client
state: started
enabled: yes
become: yes