1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Update xo.yml

This commit is contained in:
A Holt 2017-12-08 01:05:03 -05:00 committed by GitHub
parent 2a4f2ac64a
commit 29fe74652b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,31 +3,36 @@
- name: Disable sleep - name: Disable sleep
command: touch /etc/powerd/flags/inhibit-suspend command: touch /etc/powerd/flags/inhibit-suspend
creates=/etc/powerd/flags/inhibit-suspend args:
creates: /etc/powerd/flags/inhibit-suspend
- name: Disable sleep on lid closing - name: Disable sleep on lid closing
lineinfile: dest=/etc/powerd/powerd.conf lineinfile:
regexp='^config_SLEEP_WHEN_LID_CLOSED' dest: /etc/powerd/powerd.conf
line='config_SLEEP_WHEN_LID_CLOSED="no"' regexp: '^config_SLEEP_WHEN_LID_CLOSED'
state=present line: 'config_SLEEP_WHEN_LID_CLOSED="no"'
backup=yes state: present
backup: yes
- name: Keep yum cache - name: Keep yum cache
ini_file: dest=/etc/yum.conf ini_file:
section=main dest: /etc/yum.conf
option=keepcache section: main
value=1 option: keepcache
value: 1
when: not installing when: not installing
- name: Keep docs when installing packages - name: Keep docs when installing packages
lineinfile: backup=yes lineinfile:
dest=/etc/rpm/macros.imgcreate backup: yes
regexp='^%_excludedocs' dest: /etc/rpm/macros.imgcreate
state=absent regexp: '^%_excludedocs'
state: absent
- name: Pre-install packages - name: Pre-install packages
package: name={{ item }} package:
state=latest name: "{{ item }}"
state: latest
with_items: with_items:
- usbmount - usbmount
- man - man
@ -39,77 +44,91 @@
when: not osbuilder is defined when: not osbuilder is defined
- name: Configure networkmanager plugin - name: Configure networkmanager plugin
ini_file: dest=/etc/NetworkManager/NetworkManager.conf ini_file:
section=main dest: /etc/NetworkManager/NetworkManager.conf
option=plugins section: main
value=ifcfg-rh,keyfile option: plugins
value: ifcfg-rh,keyfile
- name: Check for modem config file - name: Check for modem config file
stat: path=/etc/NetworkManager/system-connections/"Sugar Modem Connection" stat:
path: /etc/NetworkManager/system-connections/"Sugar Modem Connection"
register: config register: config
- name: Change failure and interval settings for modem connection - name: Change failure and interval settings for modem connection
ini_file: dest=/etc/NetworkManager/system-connections/"Sugar Modem Connection" ini_file:
section=ppp dest: /etc/NetworkManager/system-connections/"Sugar Modem Connection"
option={{ item.option }} section: ppp
value={{ item.value }} option: "{{ item.option }}"
backup=yes value: "{{ item.value }}"
mode=0600 backup: yes
mode: 0600
with_items: with_items:
- { option: 'lcp-echo-failure', value: '5' } - { option: 'lcp-echo-failure', value: '5' }
- { option: 'lcp-echo-interval', value: '30' } - { option: 'lcp-echo-interval', value: '30' }
when: config.stat.exists when: config.stat.exists
- name: Create bigger rwtab - name: Create bigger rwtab
lineinfile: backup=yes lineinfile:
dest=/etc/sysconfig/readonly-root backup: yes
regexp='^RW_OPTIONS' dest: /etc/sysconfig/readonly-root
line='RW_OPTIONS="-o size=4M -o nr_inodes=2048"' regexp: '^RW_OPTIONS'
state=present line: 'RW_OPTIONS="-o size=4M -o nr_inodes=2048"'
state: present
- name: Remove dhcpd entry from /etc/rwtab - name: Remove dhcpd entry from /etc/rwtab
lineinfile: backup=yes lineinfile:
dest=/etc/rwtab backup: yes
regexp='^empty.*/var/lib/dhcpd' dest: /etc/rwtab
state=absent regexp: '^empty.*/var/lib/dhcpd'
state: absent
- name: Remove php entry from /etc/rwtab - name: Remove php entry from /etc/rwtab
lineinfile: backup=yes lineinfile:
dest=/etc/rwtab backup: yes
regexp='^empty.*/var/lib/php' dest: /etc/rwtab
state=absent regexp: '^empty.*/var/lib/php'
state: absent
- name: Persist /etc/hosts between reboots - name: Persist /etc/hosts between reboots
lineinfile: backup=yes lineinfile:
dest=/etc/statetab.d/olpc backup: yes
regexp='^/etc/hosts' dest: /etc/statetab.d/olpc
state=absent regexp: '^/etc/hosts'
state: absent
- name: Disable /var/log tmpfs - name: Disable /var/log tmpfs
lineinfile: backup=yes lineinfile:
dest=/etc/fstab backup: yes
regexp='^varlog.*' dest: /etc/fstab
state=absent regexp: '^varlog.*'
state: absent
- name: Enlarge the /tmp directory so that url_get does not error out - name: Enlarge the /tmp directory so that url_get does not error out
lineinfile: backup=yes lineinfile:
dest=/etc/fstab backup: yes
regexp='^/tmp*' dest: /etc/fstab
line='/tmp /tmp tmpfs rw,size=600m 0 0' regexp: '^/tmp*'
line: '/tmp /tmp tmpfs rw,size=600m 0 0'
- name: Disable graphical login - name: Disable graphical login
file: path=/etc/systemd/system/default.target file:
src=/lib/systemd/system/multi-user.target src: /lib/systemd/system/multi-user.target
state=link dest: /etc/systemd/system/default.target
state: link
register: disabled_login register: disabled_login
- name: Remove custom profile settings - name: Remove custom profile settings
file: path=/etc/profile.d/zzz_olpc.sh file:
state=absent path: /etc/profile.d/zzz_olpc.sh
state: absent
- name: Download substitute software for i386 on FC18 XO1.5 - name: Download substitute software for i386 on FC18 XO1.5
get_url: url="{{ iiab_download_url }}/{{ item }}" dest={{ downloads_dir }}/{{ item }} get_url:
url: "{{ iiab_download_url }}/{{ item }}"
dest: "{{ downloads_dir }}/{{ item }}"
timeout: "{{ download_timeout }}"
with_items: with_items:
- hostapd_8188_i386 - hostapd_8188_i386
when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5" and internet_available when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5" and internet_available
@ -117,12 +136,13 @@
- xo - xo
- name: Put the substitute in place - name: Put the substitute in place
copy: src={{ downloads_dir }}/hostapd_8188_i386 copy:
dest=/usr/sbin/hostapd src: "{{ downloads_dir }}/hostapd_8188_i386"
backup=yes dest: /usr/sbin/hostapd
mode=0775 backup: yes
owner=root mode: 0775
group=root owner: root
group: root
when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5" when: wifi_id == "tplink_WM725M" and xo_model == "XO-1.5"
- name: Reboot system - name: Reboot system