geerlingguy / docker-fedora38-ansible Goto Github PK
View Code? Open in Web Editor NEWFedora 38 Docker container for Ansible playbook and role testing.
Home Page: https://hub.docker.com/r/geerlingguy/docker-fedora38-ansible/
License: MIT License
Fedora 38 Docker container for Ansible playbook and role testing.
Home Page: https://hub.docker.com/r/geerlingguy/docker-fedora38-ansible/
License: MIT License
We currently use this Docker image to test our cisagov Ansible roles. I am looking to test our Ansible roles on both aarch64 and arm64 platforms, but this image does not support the former. It would be nice if it did.
Using Molecule to test nomad role:
task.yaml
---
- name: Import assert.yml
ansible.builtin.import_tasks: assert.yml
run_once: true
delegate_to: localhost
- name: Install required packages
package:
name:
- unzip
- wget
state: present
- name: update cache
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
when: ansible_os_family == "Debian"
- name: Download and install software
ansible.builtin.unarchive:
src: "https://releases.hashicorp.com/nomad/{{ nomad_version }}/nomad_{{ nomad_version }}_linux_amd64.zip"
dest: "{{ nomad_destination }}"
remote_src: yes
owner: root
group: root
mode: '0755'
- name: Create Nomad config directory
ansible.builtin.file:
path: "{{ nomad_config_dir }}"
state: directory
owner: root
group: root
mode: '0755'
- name: Create Nomad data directory
ansible.builtin.file:
path: "{{ nomad_data_dir }}"
state: directory
owner: root
group: root
mode: '0755'
- name: Copy Nomad configuration
ansible.builtin.copy:
src: "files/nomad.hcl"
dest: /etc/nomad.d/nomad.hcl
owner: root
group: root
mode: '0644'
- name: Copy Nomad configuration
ansible.builtin.copy:
src: "files/nomad.service"
dest: /etc/systemd/system/nomad.service
owner: root
group: root
mode: '0644'
- name: Enable and start Nomad service
ansible.builtin.systemd:
name: nomad
enabled: true
state: started
daemon_reload: true
molecule.yaml
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: instance
image: fedora_local_systemd:latest # image build local using dockerfile
pre_build_image: true
privileged: true
override_command: false
command: /sbin/init
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
tmpfs:
- /run
- /tmp
provisioner:
name: ansible
verifier:
name: ansible
Output :
molecule converge
fatal: [instance]: UNREACHABLE! => {"changed": false, "msg": "Failed to create temporary directory. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"
echo ~/.ansible/tmp \"&& mkdir \"
echo ~/.ansible/tmp/ansible-tmp-1682405122.76964-49234-21241474154623 \" && echo ansible-tmp-1682405122.76964-49234-21241474154623=\"
echo ~/.ansible/tmp/ansible-tmp-1682405122.76964-49234-21241474154623 \" ), exited with result 1", "unreachable": true}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.