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