Move Firefox tasks into a commont tasks folder

This commit is contained in:
Scott Wallace 2019-01-31 22:31:01 +00:00
parent 986174e7f2
commit fae5a6364d
2 changed files with 14 additions and 13 deletions

View file

@ -1,23 +1,27 @@
- name: 'Firefox: Set base path'
- name: 'Firefox: Setting base path'
tags:
- config
- firefox
block:
- set_fact:
- name: 'Firefox: Setting path (Linux)'
set_fact:
firefox_path: '~/.mozilla/firefox'
when: ansible_system == 'Linux'
- set_fact:
- name: 'Firefox: Setting path (Darwin)'
set_fact:
firefox_path: '~/Library/Application Support/Firefox'
when: ansible_system == 'Darwin'
- name: 'Firefox: Discover profile path'
- name: 'Firefox: Discovering profile path'
tags:
- config
- firefox
block:
- set_fact:
- name: 'Firefox: Setting profile_path'
set_fact:
profile_path: "{{ firefox_path }}/{{ lookup('ini', 'Path section=Profile0 file=' + firefox_path + '/profiles.ini') }}"
- set_fact:
- name: 'Firefox: Setting user config path'
set_fact:
userconfig_path: "{{ profile_path }}/user.js"
- name: 'Firefox: Updating config'
@ -25,7 +29,7 @@
- config
- firefox
block:
- name: 'Firefox: Download lockdown config (relaxed)'
- name: 'Firefox: Downloading lockdown config (relaxed)'
get_url:
url: 'https://raw.githubusercontent.com/pyllyukko/user.js/relaxed/user.js'
dest: "{{ userconfig_path }}-lockdown"
@ -33,7 +37,7 @@
force: yes
backup: no
- name: 'Firefox: Replace user.js'
- name: 'Firefox: Replacing user.js'
copy:
src: "{{ userconfig_path }}-lockdown"
dest: "{{ userconfig_path }}"

View file

@ -1,8 +1,5 @@
- name: "Desktop tasks ({{ ansible_system }})"
include_tasks: "{{ loop_task }}"
loop: "{{ query('fileglob', \"{{ ansible_system|lower }}/*\") | sort }}"
include: "{{ loop_task }}"
loop: "{{ query('fileglob', \"{{ ansible_system|lower }}/*\", \"common/*\") | sort }}"
loop_control:
loop_var: loop_task
- name: Desktop tasks (Common)
import_tasks: firefox.yaml