diff --git a/.travis.yml b/.travis.yml index 91a98ef..cca541b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,24 +3,30 @@ sudo: required language: generic matrix: include: + # High Sierra - os: osx - osx_image: xcode10 + osx_image: xcode10.1 + env: ANSIBLE_VERSION='<2.8.0' + # High Sierra + - os: osx + osx_image: xcode10.1 env: ANSIBLE_VERSION='<2.7.0' + # High Sierra - os: osx - osx_image: xcode10 + osx_image: xcode10.1 env: ANSIBLE_VERSION='<2.6.0' + # High Sierra - os: osx - osx_image: xcode10 + osx_image: xcode10.1 env: ANSIBLE_VERSION='<2.5.0' + # Sierra - os: osx osx_image: xcode9.2 - env: ANSIBLE_VERSION='<2.7.0' + env: ANSIBLE_VERSION='<2.8.0' + # El Capitan - os: osx osx_image: xcode8 - env: ANSIBLE_VERSION='<2.7.0' - - os: osx - osx_image: xcode6.4 - env: ANSIBLE_VERSION='<2.7.0' + env: ANSIBLE_VERSION='<2.8.0' branches: only: @@ -28,41 +34,40 @@ branches: - /^\d+\.\d+(\.\d+)?(-\S*)?$/ before_install: - # Check Python version - - which python - - ls -l $(which python) - - /usr/bin/python --version + # Unwind the developer environment + - URL=https://raw.githubusercontent.com/Homebrew/install/master/uninstall + - curl -sLO "${URL}" + - chmod +x uninstall + - ./uninstall --force + - rm -rf /usr/local/Homebrew + - sudo rm -rf /usr/local/Caskroom + - sudo rm -rf /usr/local/bin/brew + - sudo rm -rf /Library/Developer/CommandLineTools # Install pip - curl https://bootstrap.pypa.io/get-pip.py | sudo -H /usr/bin/python + - which pip - pip --version # Setup virtualenv - - brew cleanup - sudo -H pip install -U virtualenv - virtualenv --version - virtualenv .venv - source .venv/bin/activate - - pip install -U 'pip' + +install: + # Upgrade setuptools and install setuptools_scm (for testinfra) + - pip install -U setuptools setuptools_scm + + # Dependencies - pip install "ansible${ANSIBLE_VERSION}" - - pip install 'ansible-lint' - - pip install 'testinfra' - - pip install 'yamllint' + - pip install ansible-lint + - pip install testinfra + - pip install yamllint - # For version_check.py + # Requests, required for version_check.py - pip install requests - # Unwind the developer environment - - URL=https://raw.githubusercontent.com/Homebrew/install/master/uninstall - - curl -sLO "${URL}" - - chmod +x uninstall - - ./uninstall --force - - rm -rf /usr/local/Homebrew - - sudo rm -rf /usr/local/Caskroom - - sudo rm -rf /usr/local/bin/brew - - sudo rm -rf /Library/Developer/CommandLineTools - -install: # Check versions - ansible --version - ansible-lint --version diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c37f5ce..861595f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,7 +43,7 @@ pip install --no-deps -r tests/test-requirements.txt ``` Run the full lifecycle test on a given ``. Allowed values for -`` are `highsierra`, `sierra`, `elcapitan`, and `yosemite`. +`` are `mojave`, `highsierra`, `sierra`, `elcapitan`, and `yosemite`. ```bash source molecule/.sh diff --git a/meta/main.yml b/meta/main.yml index 360a29c..6016f6b 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -2,6 +2,7 @@ galaxy_info: author: Elliot Weiser description: Installs OS X Command Line Tools + company: None license: MIT @@ -10,6 +11,8 @@ galaxy_info: platforms: - name: MacOSX versions: + - '10.14' + - '10.13' - '10.12' - '10.11' - '10.10' @@ -19,8 +22,10 @@ galaxy_info: - development - elcapitan - headless + - highsierra - line - mac + - mojave - osx - sierra - tools diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index f0d3028..bb49a4b 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -10,7 +10,7 @@ lint: platforms: - name: ${MOLECULE_NAME} box: ${MOLECULE_BOX} - box_version: ${MOLECULE_BOX_VERSION} + box_version: "${MOLECULE_BOX_VERSION}" memory: 2048 cpus: 4 config_options: @@ -22,6 +22,7 @@ provisioner: create: create.yml converge: ../../tests/playbook.yml destroy: destroy.yml + prepare: prepare.yml config_options: defaults: callback_whitelist: profile_tasks,timer diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index dbe63d3..079fd25 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -1,10 +1,9 @@ --- - name: Prepare - hosts: localhost - connection: local - gather_facts: False - no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}" + hosts: all tasks: - - name: Nothing to prepare - debug: - msg: Nothing to do! Moving on... + - name: Remove existing Command Line Tools installation + file: + path: /Library/Developer/CommandLineTools + state: absent + become: yes diff --git a/molecule/mojave.sh b/molecule/mojave.sh new file mode 100644 index 0000000..55aa95b --- /dev/null +++ b/molecule/mojave.sh @@ -0,0 +1,3 @@ +export MOLECULE_NAME=mojave +export MOLECULE_BOX=ashiq/osx-10.14 +export MOLECULE_BOX_VERSION='0.1' diff --git a/tests/test-requirements.txt b/tests/test-requirements.txt index bf4530e..1609363 100644 --- a/tests/test-requirements.txt +++ b/tests/test-requirements.txt @@ -1,4 +1,4 @@ -ansible==2.6.4 +ansible==2.7.2 ansible-lint==3.4.23 anyconfig==0.9.7 arrow==0.12.1 @@ -9,7 +9,7 @@ backports.functools-lru-cache==1.5 bcrypt==3.1.4 binaryornot==0.4.4 Cerberus==1.2 -certifi==2018.8.24 +certifi==2018.10.15 cffi==1.11.5 chardet==3.0.4 click==6.7 @@ -17,20 +17,20 @@ click-completion==0.3.1 colorama==0.3.9 configparser==3.5.0 cookiecutter==1.6.0 -cryptography==2.3.1 +cryptography==2.4.2 enum34==1.1.6 fasteners==0.14.1 flake8==3.5.0 funcsigs==1.0.2 -future==0.16.0 +future==0.17.1 git-url-parse==1.1.0 idna==2.7 ipaddress==1.0.22 Jinja2==2.10 jinja2-time==0.2.0 -MarkupSafe==1.0 +MarkupSafe==1.1.0 mccabe==0.6.1 -molecule==2.18.1 +molecule==2.19.0 monotonic==1.5 more-itertools==4.3.0 paramiko==2.4.2 @@ -38,28 +38,28 @@ pathlib2==2.3.2 pathspec==0.5.9 pbr==4.1.0 pexpect==4.6.0 -pluggy==0.7.1 -poyo==0.4.1 +pluggy==0.8.0 +poyo==0.4.2 psutil==5.4.6 ptyprocess==0.6.0 -py==1.6.0 +py==1.7.0 pyasn1==0.4.4 pycodestyle==2.3.1 pycparser==2.19 pyflakes==1.6.0 -PyNaCl==1.2.1 -pytest==3.8.1 -python-dateutil==2.7.3 +PyNaCl==1.3.0 +pytest==4.0.1 +python-dateutil==2.7.5 python-gilt==1.2.1 python-vagrant==0.5.15 PyYAML==3.13 -requests==2.19.1 +requests==2.20.1 scandir==1.9.0 sh==1.12.14 six==1.11.0 tabulate==0.8.2 -testinfra==1.14.1 +testinfra==1.16.0 tree-format==0.1.2 -urllib3==1.23 -whichcraft==0.4.1 +urllib3==1.24.1 +whichcraft==0.5.2 yamllint==1.11.1